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 c++/114297] New: Yet more problems with "definition in block does not dominate use in block" Date: Sun, 10 Mar 2024 15:11:04 +0000 [thread overview] Message-ID: <bug-114297-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114297 Bug ID: 114297 Summary: Yet more problems with "definition in block does not dominate use in block" Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- For this C++ code: void __assert_fail(char *, int, const char *) __attribute__((__noreturn__)); template <class T> void max(T, T); template <class T> struct SimpleVector { T array; int num; T *getRef(int i) { num - i ? void() : __assert_fail("", 7, __PRETTY_FUNCTION__); return &array + i; } }; struct Extremes { int minWidth; int maxWidth; }; int forceCalcColumnExtremes_cs; struct Table { SimpleVector<Extremes> colExtremes; void forceCalcColumnExtremes(); }; void Table::forceCalcColumnExtremes() { int minSumCols, maxSumCols; for (int i; i; ++i) { minSumCols += colExtremes.getRef(i)->minWidth; maxSumCols += colExtremes.getRef(i)->maxWidth; } max(forceCalcColumnExtremes_cs, minSumCols); max(forceCalcColumnExtremes_cs, maxSumCols); } compiled by recent gcc trunk, does this: cvise $ ~/gcc/results/bin/g++ -c -w -O3 bug1022.cc cvise $ ~/gcc/results/bin/g++ -c -w -O3 -march=znver3 bug1022.cc bug1022.cc: In member function ‘void Table::forceCalcColumnExtremes()’: bug1022.cc:20:6: error: definition in block 5 does not dominate use in block 3 20 | void Table::forceCalcColumnExtremes() { | ^~~~~ for SSA_NAME: vect_maxSumCols_16.16_76 in statement: vect_maxSumCols_16.16_90 = PHI <vect_maxSumCols_16.16_76(3)> PHI argument vect_maxSumCols_16.16_76 for PHI node vect_maxSumCols_16.16_90 = PHI <vect_maxSumCols_16.16_76(3)> during GIMPLE pass: vect bug1022.cc:20:6: internal compiler error: verify_ssa failed 0x159e432 verify_ssa(bool, bool) ../../trunk.20210101/gcc/tree-ssa.cc:1203 0x1204a9d execute_function_todo ../../trunk.20210101/gcc/passes.cc:2095 The bug first seems to occur sometime between g:71244316cf714725 and g:10cbfcd60f9e5bdb, which is a distance of 43 commits.
next reply other threads:[~2024-03-10 15:11 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-10 15:11 dcb314 at hotmail dot com [this message] 2024-03-10 18:29 ` [Bug tree-optimization/114297] [14 Regression] " pinskia at gcc dot gnu.org 2024-03-10 18:38 ` pinskia at gcc dot gnu.org 2024-03-11 8:11 ` rguenth at gcc dot gnu.org 2024-03-12 7:17 ` cvs-commit at gcc dot gnu.org 2024-03-12 7:17 ` rguenth 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-114297-4@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).