public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dcb314 at hotmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106794] [13 Regression] ice in vect_transform_slp_perm_load_1 Date: Wed, 31 Aug 2022 16:58:08 +0000 [thread overview] Message-ID: <bug-106794-4-Z1TJnzWhME@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106794-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106794 --- Comment #2 from David Binderman <dcb314 at hotmail dot com> --- Reduced code seems to be: template <class T> struct Vector3 { Vector3(); Vector3(T, T, T); T length() const; T x, y, z; }; template <class T> Vector3<T>::Vector3(T _x, T _y, T _z) : x(_x), y(_y), z(_z) {} Vector3<float> cross(Vector3<float> a, Vector3<float> b) { return Vector3<float>(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x); } template <class T> T Vector3<T>::length() const { return z; } int generateNormals_i; float generateNormals_p2_0, generateNormals_p0_0; struct SphereMesh { void generateNormals(); float vertices; }; void SphereMesh::generateNormals() { Vector3<float> *faceNormals = new Vector3<float>; for (int j; j; j++) { float *p0 = &vertices + 3, *p1 = &vertices + j * 3, *p2 = &vertices + 3, *p3 = &vertices + generateNormals_i + j * 3; Vector3<float> v0(p1[0] - generateNormals_p0_0, p1[1] - 1, p1[2] - 2), v1(0, 1, 2); if (v0.length()) v1 = Vector3<float>(p3[0] - generateNormals_p2_0, p3[1] - p2[1], p3[2] - p2[2]); else v1 = Vector3<float>(generateNormals_p0_0 - p3[0], p0[1] - p3[1], p0[2] - p3[2]); Vector3<float> faceNormal = cross(v0, v1); faceNormals[j] = faceNormal; } } Flags -c -O3 -ffast-math -march=bdver2 required.
next prev parent reply other threads:[~2022-08-31 16:58 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-31 16:18 [Bug c++/106794] New: " dcb314 at hotmail dot com 2022-08-31 16:23 ` [Bug c++/106794] " dcb314 at hotmail dot com 2022-08-31 16:28 ` [Bug tree-optimization/106794] [13 Regression] " pinskia at gcc dot gnu.org 2022-08-31 16:58 ` dcb314 at hotmail dot com [this message] 2022-08-31 20:32 ` [Bug tree-optimization/106794] [13 Regression] ICE in vect_transform_slp_perm_load_1 since r13-2288-g61c4c989034548f4 marxin at gcc dot gnu.org 2022-09-13 10:20 ` rsandifo at gcc dot gnu.org 2022-09-14 12:24 ` rsandifo at gcc dot gnu.org 2022-09-20 14:28 ` cvs-commit at gcc dot gnu.org 2022-09-20 14:29 ` rsandifo at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-106794-4-Z1TJnzWhME@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).