[Bug c++/104079] [10/11/12 Regression] internal compiler error: in nothrow_spec_p, at cp/except.c:1192 since r9-4662-g0d699def39bb937e
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104079 Martin Liška changed: What|Removed |Added Keywords|needs-bisection | CC||aoliva at gcc dot gnu.org, ||marxin at gcc dot gnu.org Summary|[10/11/12 Regression] |[10/11/12 Regression] |internal compiler error: in |internal compiler error: in |nothrow_spec_p, at |nothrow_spec_p, at |cp/except.c:1192|cp/except.c:1192 since ||r9-4662-g0d699def39bb937e --- Comment #5 from Martin Liška --- Started with r9-4662-g0d699def39bb937e.
[Bug tree-optimization/104064] gcc/tree-vect-data-refs.c:3208:16: runtime error: signed integer overflow: 17 - -9223372036854775806 cannot be represented in type 'long int'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104064 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1 Last reconfirmed||2022-01-18 Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #1 from Richard Biener --- I have a patch.
[Bug c++/104079] [9/10/11/12 Regression] internal compiler error: in nothrow_spec_p, at cp/except.c:1192 since r9-4662-g0d699def39bb937e
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104079 Andrew Pinski changed: What|Removed |Added Known to fail||9.1.0, 9.4.0 Target Milestone|10.4|9.5 Known to work|9.1.0, 9.4.0|8.5.0 Summary|[10/11/12 Regression] |[9/10/11/12 Regression] |internal compiler error: in |internal compiler error: in |nothrow_spec_p, at |nothrow_spec_p, at |cp/except.c:1192 since |cp/except.c:1192 since |r9-4662-g0d699def39bb937e |r9-4662-g0d699def39bb937e --- Comment #6 from Andrew Pinski --- I don't know how I messed up testing 9.x. Anyways my reduced testcase fails there too.
[Bug target/103771] [12 Regression] Missed vectorization under -mavx512f -mavx512vl after r12-5489
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771 --- Comment #21 from Hongtao.liu --- (In reply to Hongtao.liu from comment #20) > (In reply to Richard Biener from comment #19) > > Ah, so the issue is missing -mavx512bw which means we end up with a AVX2 > > style > > mask for V32QImode. With -mavx512bw the code vectorizes fine. > > Vectorization code is worse than before, now we need to pack vectorized mask > which takes extra 3 instructions. Current ifcvt convert -dump of .ch_vect--- if (x.1_14 > 255) goto ; [50.00%] else goto ; [50.00%] [local count: 477815112]: _17 = -_5; _18 = _17 >> 31; iftmp.0_19 = (unsigned char) _18; goto ; [100.00%] [local count: 477815112]: iftmp.0_20 = (unsigned char) _5; [local count: 955630225]: # iftmp.0_21 = PHI ---dump end- to dump of .ifcvt- _41 = -x.1_14; _17 = (int) _41; _18 = _17 >> 31; iftmp.0_19 = (unsigned char) _18; -- vec_pack_trunc iftmp.0_20 = (unsigned char) _5; -- vec_pack_trunc iftmp.0_21 = x.1_14 > 255 ? iftmp.0_19 : iftmp.0_20; -- vec_pack_trunc *_6 = iftmp.0_21; x_16 = x_24 + 1; -dump end-- if ifcvt output things like optimal .ifcvt-- _41 = -x.1_14; _17 = (int) _41; _18 = _17 >> 31; iftmp.0_21 = x.1_14 > 255 ? _18 : _5; iftmp.0_22 = (unsigned char) iftmp.0_21; --- vec_pack_trunc *_6 = iftmp.0_22; x_16 = x_24 + 1; end we can save operations for packing mask(3 vec_pack_trunc vs 1 vec_pack_trunc?).
[Bug c++/104081] New: Variable optimized out despite -Og
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104081 Bug ID: 104081 Summary: Variable optimized out despite -Og Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: matthias at urlichs dot de Target Milestone: --- I expect the optimizer, when confronted with "-Og", to keep my variables debuggable. (I also expect (of me) to not make terminally stupid mistakes like the one exhibited here, but that's a different problem …) // "data" is a std::string_view (gdb) l 19 if(data.length() == 0) 20 throw_invalid("empty",data); 21 } 22 for (const auto& c : data) { 23 if ('0' < c || '9' > c) 24 throw_invalid("not a number",data); 25 val = val*10 + c-'0'; 26 } 27 if(neg) 28 val = -val; (gdb) p data $1 = (gdb) p c $2 = (gdb) q Options: g++-12 -march=native -Og -g -xc++ -std=c++17 …
[Bug c++/104081] Variable optimized out despite -Og
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104081 --- Comment #1 from Matthias Urlichs --- current line is 24, after "throw_invalid" has called abort()
[Bug target/103771] [12 Regression] Missed vectorization under -mavx512f -mavx512vl after r12-5489
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771 --- Comment #22 from Hongtao.liu --- (In reply to Hongtao.liu from comment #21) > (In reply to Hongtao.liu from comment #20) > > (In reply to Richard Biener from comment #19) > > > Ah, so the issue is missing -mavx512bw which means we end up with a AVX2 > > > style > > > mask for V32QImode. With -mavx512bw the code vectorizes fine. > > > > Vectorization code is worse than before, now we need to pack vectorized mask > > which takes extra 3 instructions. > > Current ifcvt convert > > -dump of .ch_vect--- > if (x.1_14 > 255) > goto ; [50.00%] > else > goto ; [50.00%] > >[local count: 477815112]: > _17 = -_5; > _18 = _17 >> 31; > iftmp.0_19 = (unsigned char) _18; > goto ; [100.00%] > >[local count: 477815112]: > iftmp.0_20 = (unsigned char) _5; > >[local count: 955630225]: > # iftmp.0_21 = PHI > ---dump end- > > > to > dump of .ifcvt- > _41 = -x.1_14; > _17 = (int) _41; > _18 = _17 >> 31; > iftmp.0_19 = (unsigned char) _18; -- vec_pack_trunc > iftmp.0_20 = (unsigned char) _5; -- vec_pack_trunc > iftmp.0_21 = x.1_14 > 255 ? iftmp.0_19 : iftmp.0_20; -- vec_pack_trunc > *_6 = iftmp.0_21; > x_16 = x_24 + 1; > -dump end-- > > > if ifcvt output things like > optimal .ifcvt-- > _41 = -x.1_14; > _17 = (int) _41; > _18 = _17 >> 31; > iftmp.0_21 = x.1_14 > 255 ? _18 : _5; > iftmp.0_22 = (unsigned char) iftmp.0_21; --- vec_pack_trunc > *_6 = iftmp.0_22; > x_16 = x_24 + 1; > end > > we can save operations for packing mask(3 vec_pack_trunc vs 1 > vec_pack_trunc?). Or maybe a gimple simplification for it?
[Bug middle-end/104081] Variable optimized out despite -Og
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104081 --- Comment #2 from Andrew Pinski --- Can you attach the original source?
[Bug c/104082] New: Wdangling-pointer: 2 * false positive ?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104082 Bug ID: 104082 Summary: Wdangling-pointer: 2 * false positive ? Product: gcc Version: 12.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: $ more bug790.cc int *metricp; void s88() { int distance; metricp = &distance; } $ Does this with recent gcc trunk: $ /home/dcb/gcc/results/bin/gcc -c -O2 -D_FORTIFY_SOURCE=2 -Wall bug790.cc bug790.cc: In function ‘void s88()’: bug790.cc:4:11: warning: storing the address of local variable ‘distance’ in ‘metricp’ [-Wdangling-pointer=] 4 | metricp = &distance; | ^~~ bug790.cc:3:7: note: ‘distance’ declared here 3 | int distance; | ^~~~ bug790.cc:1:6: note: ‘metricp’ declared here 1 | int *metricp; | ^~~ bug790.cc:4:11: warning: storing the address of local variable ‘distance’ in ‘metricp’ [-Wdangling-pointer=] 4 | metricp = &distance; | ^~~ bug790.cc:3:7: note: ‘distance’ declared here 3 | int distance; | ^~~~ bug790.cc:1:6: note: ‘metricp’ declared here 1 | int *metricp; | ^~~ $ I've no idea why the warning is generated, the code looks legal to me and I've no idea why the warning is duplicated.
[Bug c/104082] Wdangling-pointer: 2 * false positive ?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104082 --- Comment #1 from Andrew Pinski --- >I've no idea why the warning is generated, the code looks legal to me The warning is generated even though the code is valid, if someone deferences metricp after the call to s88, the code becomes undefined. It is designed to warn about that case. Why the warning is duplicated I have no idea.
[Bug middle-end/104081] Variable optimized out despite -Og
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104081 --- Comment #3 from Matthias Urlichs --- Sure. gcc -Og -g -std=c++17 -lstdc++ /tmp/test.cpp #include #include void throw_invalid(const char *a, std::string_view b) { (void)a; (void)b; throw; } int64_t str_atoi(std::string_view data) { const std::string_view odata = data; int64_t val = 0; bool neg; if(data.length() == 0) throw_invalid("empty",odata); neg = data.front() == '-'; if(neg) { data.remove_prefix(1); if(data.length() == 0) throw_invalid("empty",data); } for (const auto& c : data) { if (c < '0' || '9' < c) throw_invalid("not a number",odata); val = val*10 + c-'0'; } if(neg) val = -val; return val; } int main() { volatile int x = str_atoi("nope"); }
[Bug tree-optimization/104082] Wdangling-pointer: 2 * false positive ?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104082 --- Comment #2 from David Binderman --- (In reply to Andrew Pinski from comment #1) > >I've no idea why the warning is generated, the code looks legal to me > > The warning is generated even though the code is valid, if someone > deferences metricp after the call to s88, the code becomes undefined. A warning for valid code is IMHO really bad. It would be a better warning if it only happened when the pointer is dereferenced. As is, I've got to find every occurrence of this warning and manually check for a problem. I think 90% of the time, it going to be legal code. > Why the warning is duplicated I have no idea. Righto.
[Bug testsuite/104083] New: Ada testsuite does not respect RUNTESTFLAGS
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104083 Bug ID: 104083 Summary: Ada testsuite does not respect RUNTESTFLAGS Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: testsuite Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: ebotcazou at gcc dot gnu.org Target Milestone: --- Running the following: $ make check -k RUNTESTFLAGS="maintainers.exp" ... Running chapter c7 ... Running chapter c7 ... Running chapter c7 ... Running chapter c7 ... Running chapter c7 ... Running chapter c8 ... Running chapter c7 ... Running chapter c8 ... Running chapter c7 ... Running chapter c8 ... Running chapter c8 ... should not run anything from Ada testsuite. Moreover, when I terminate the command, there are still new messages of 'Running chapter c7 ...' being printer to terminal.
[Bug testsuite/104083] Ada testsuite does not respect RUNTESTFLAGS
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104083 Eric Botcazou changed: What|Removed |Added CC||ro at gcc dot gnu.org Ever confirmed|0 |1 Last reconfirmed||2022-01-18 Status|UNCONFIRMED |SUSPENDED --- Comment #1 from Eric Botcazou --- The ACATS testsuite is not based on DejaGNU so it cannot. IIRC Rainer had a patch to do the conversion at some point but it was heavyweight.
[Bug tree-optimization/102087] [12 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: in determine_exit_conditions, at tree-ssa-loop-manip.c:1049 since r12-3136-g3673dcf6d6baeb67
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102087 --- Comment #20 from David Binderman --- This code still seems broken: **Gif_ClipImage_gfi_0; Gif_ClipImage_gfi_1, Gif_ClipImage_y, Gif_ClipImage_shift; Gif_ClipImage() { Gif_ClipImage_y = Gif_ClipImage_gfi_1 - 1; for (; Gif_ClipImage_y >= Gif_ClipImage_shift; Gif_ClipImage_y++) Gif_ClipImage_gfi_0[Gif_ClipImage_shift] = Gif_ClipImage_gfi_0[Gif_ClipImage_y]; } bug760.c: In function ‘Gif_ClipImage’: bug760.c:3:1: error: type mismatch in binary expression 3 | Gif_ClipImage() { | ^ unsigned int int int _18 = Gif_ClipImage_gfi_1.0_1 + -1; bug760.c:3:1: error: type mismatch in binary expression unsigned int int int _12 = Gif_ClipImage_gfi_1.0_1 + -1; during GIMPLE pass: aprefetch bug760.c:3:1: internal compiler error: verify_gimple failed 0xde2f5a verify_gimple_in_cfg(function*, bool) Flag -O3 -march=bdver2 required.
[Bug libstdc++/104080] [12 Regression] newlib doesn't have endian.h causing build failure with 2800bc08e4ab r12-6646
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104080 Pekka S changed: What|Removed |Added CC||p...@gcc-bugzilla.mail.kaps ||i.fi --- Comment #3 from Pekka S --- Created attachment 52216 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52216&action=edit Fix compile issue with newlib A further improved patch. Simply does an explicit cast following the style of the library; int32_t(64). With the patch compiles for target AArch64 LP64/ILP32, not tested otherwise.
[Bug tree-optimization/104064] gcc/tree-vect-data-refs.c:3208:16: runtime error: signed integer overflow: 17 - -9223372036854775806 cannot be represented in type 'long int'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104064 --- Comment #2 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:00dc7877ee02634d4837d024e36b55bef6b9d49c commit r12-6660-g00dc7877ee02634d4837d024e36b55bef6b9d49c Author: Richard Biener Date: Tue Jan 18 09:06:13 2022 +0100 tree-optimization/104064 - UBSAN issue in vect dataref analysis Since we order DRs after DR_INIT we know the difference will be positive and thus can avoid signed overflow issues by using unsigned arithmetic to produce the known unsigned result. 2022-01-18 Richard Biener PR tree-optimization/104064 * tree-vect-data-refs.cc (vect_analyze_data_ref_accesses): Check DR_INIT fits in a signed HWI, represent the difference from the first DR in unsigned.
[Bug tree-optimization/104064] gcc/tree-vect-data-refs.c:3208:16: runtime error: signed integer overflow: 17 - -9223372036854775806 cannot be represented in type 'long int'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104064 Richard Biener changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #3 from Richard Biener --- Fixed.
[Bug other/63426] [meta-bug] Issues found with -fsanitize=undefined
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63426 Bug 63426 depends on bug 104064, which changed state. Bug 104064 Summary: gcc/tree-vect-data-refs.c:3208:16: runtime error: signed integer overflow: 17 - -9223372036854775806 cannot be represented in type 'long int' https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104064 What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED
[Bug libstdc++/104080] [12 Regression] newlib doesn't have endian.h causing build failure with 2800bc08e4ab r12-6646
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104080 --- Comment #4 from Jonathan Wakely --- It would be better to use __has_include to detect headers, not hardcoding it based on target macros. But I don't see why we need that header anyway, GCC defines __BYTE_ORDER__ and __ORDER_LITTLE_ENDIAN__ without any headers. We should just rip that piece of fast_float out.
[Bug testsuite/104083] Ada testsuite does not respect RUNTESTFLAGS
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104083 --- Comment #2 from Richard Biener --- Once could of course argue that eventually the acats/run_all.sh can somehow pick up options from the RUNTESTFLAGS argument (it might need to be exported somehow of course).
[Bug tree-optimization/104082] Wdangling-pointer: 2 * false positive ?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104082 Richard Biener changed: What|Removed |Added Ever confirmed|0 |1 CC||msebor at gcc dot gnu.org Last reconfirmed||2022-01-18 Status|UNCONFIRMED |NEW --- Comment #3 from Richard Biener --- It's a style warning as much as a correctness one (like most warnings are). A good programmers style workaround would be int *metricp; void s88() { int distance; metricp = &distance; metricp = NULL; } but I realize that's tedious and wasted cycles in the end (when all bogus users are identified and fixed). I do question -Wdangling-pointer being included in -Wall, it's at most -Wextra category, if at all.
[Bug tree-optimization/102087] [12 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: in determine_exit_conditions, at tree-ssa-loop-manip.c:1049 since r12-3136-g3673dcf6d6baeb67
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102087 Martin Liška changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- --- Comment #21 from Martin Liška --- > _12 = Gif_ClipImage_gfi_1.0_1 + -1; > during GIMPLE pass: aprefetch > bug760.c:3:1: internal compiler error: verify_gimple failed > 0xde2f5a verify_gimple_in_cfg(function*, bool) > > Flag -O3 -march=bdver2 required. Confirmed.
[Bug c++/104084] New: [12 regression] Internal compiler error: tree check: expected target_expr, have compound_expr in build_new_1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104084 Bug ID: 104084 Summary: [12 regression] Internal compiler error: tree check: expected target_expr, have compound_expr in build_new_1 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: linux at carewolf dot com Target Milestone: --- Another error encounted while compiling Qt with gcc 12. This time in libgav1 (used by Chromium). ../../../../../../qtwebengine/src/3rdparty/chromium/third_party/libgav1/src/src/utils/dynamic_buffer.h:40:19: internal compiler error: tree check: expected target_expr, have compound_expr in build_new_1, at cp/init.c:3792 40 | buffer_.reset(new (std::nothrow) T[size]); | ^~ 0x8a12eb tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/tree.c:8702 0x6f06b9 tree_operand_check_code(tree_node*, tree_code, int, char const*, int, char const*) ../../gcc/tree.h:3950 0x6f06b9 build_new_1 ../../gcc/cp/init.c:3792 0xa5c8f1 build_new(unsigned int, vec**, tree_node*, tree_node*, vec**, int, int) ../../gcc/cp/init.c:4002 0xb4a6ad tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc/cp/pt.c:20387 0xb750ca tsubst_copy_and_build_call_args ../../gcc/cp/pt.c:19761 0xb48c88 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc/cp/pt.c:20508 0xb5d33f tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc/cp/pt.c:19316 0xb5ed6b tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc/cp/pt.c:18329 0xb5e484 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc/cp/pt.c:18301 0xb5e4ec tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc/cp/pt.c:18658 0xb5c048 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc/cp/pt.c:18287 0xb5c048 instantiate_body ../../gcc/cp/pt.c:26239 0xb5d080 instantiate_decl(tree_node*, bool, bool) ../../gcc/cp/pt.c:26532 0xb813d3 instantiate_pending_templates(int) ../../gcc/cp/pt.c:26611 0xa3ba28 c_parse_final_cleanups() ../../gcc/cp/decl2.c:5097 Disabling optimizations or using different C++ standards, or fuzzing other compiler flags didn't seem to help. Let me know if you need the intermediate code.
[Bug tree-optimization/104069] -Werror=use-after-free false positive on elfutils-0.186
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104069 --- Comment #5 from Sergei Trofimovich --- (In reply to Martin Sebor from comment #4) > Actually, this is already supposed to be handled but the code is not > effective due to a typo. This fixes it: > > diff --git a/gcc/gimple-ssa-warn-access.cc b/gcc/gimple-ssa-warn-access.cc > index f639807a78a..f9508a1d211 100644 > --- a/gcc/gimple-ssa-warn-access.cc > +++ b/gcc/gimple-ssa-warn-access.cc > @@ -4082,7 +4082,9 @@ pointers_related_p (gimple *stmt, tree p, tree q, > pointer_query &qry) >access_ref pref, qref; >if (!qry.get_ref (p, stmt, &pref, 0) >|| !qry.get_ref (q, stmt, &qref, 0)) > -return true; > +/* GET_REF() only rarely fails. When it does, it's likely because > + it involves a self-referential PHI. Return a conservative result. > */ > +return false; > >return pref.ref == qref.ref; > } Thank you! This helped elfutils-0.186. But linux's objtool still fails to build. Here is extracted false positive (I think it's false positive): typedef long unsigned int size_t; extern void *malloc(size_t __size) __attribute__((__nothrow__, __leaf__)) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); extern void *realloc(void *__ptr, size_t __size) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2))); extern void die(const char *err, ...); struct cmdnames { size_t alloc; size_t cnt; struct cmdname { size_t len; char name[]; } * *names; }; static inline void *xrealloc(void *ptr, size_t size) { void *ret = realloc(ptr, size); if (!ret && !size) ret = realloc(ptr, 1); if (!ret) { ret = realloc(ptr, size); if (!ret && !size) ret = realloc(ptr, 1); if (!ret) die("Out of memory, realloc failed"); } return ret; } void add_cmdname(struct cmdnames *cmds, const char *name, size_t len) { struct cmdname *ent = malloc(sizeof(*ent) + len + 1); ent->len = len; // memcpy(ent->name, name, len); ent->name[len] = 0; do { if ((cmds->cnt + 1) > cmds->alloc) { if cmds->alloc) + 16) * 3 / 2) < (cmds->cnt + 1)) cmds->alloc = (cmds->cnt + 1); else cmds->alloc = (((cmds->alloc) + 16) * 3 / 2); cmds->names = xrealloc((cmds->names), cmds->alloc * sizeof(*(cmds->names))); } } while (0); cmds->names[cmds->cnt++] = ent; } $ gcc-12.0.0 -Wall -Werror -c help.c.c help.c.c: In function 'xrealloc': help.c.c:26:13: error: pointer 'ptr' may be used after 'realloc' [-Werror=use-after-free] 26 | ret = realloc(ptr, 1); | ^~~ help.c.c:20:15: note: call to 'realloc' here 20 | void *ret = realloc(ptr, size); | ^~ help.c.c:24:11: error: pointer 'ptr' may be used after 'realloc' [-Werror=use-after-free] 24 | ret = realloc(ptr, size); | ^~ help.c.c:20:15: note: call to 'realloc' here 20 | void *ret = realloc(ptr, size); | ^~ cc1: all warnings being treated as errors
[Bug c++/104084] [12 regression] Internal compiler error: tree check: expected target_expr, have compound_expr in build_new_1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104084 Martin Liška changed: What|Removed |Added Ever confirmed|0 |1 CC||marxin at gcc dot gnu.org Last reconfirmed||2022-01-18 Status|UNCONFIRMED |WAITING --- Comment #1 from Martin Liška --- Yes, please attach pre-processed source file (-E option) and output of -v on command line.
[Bug libstdc++/104080] [12 Regression] newlib doesn't have endian.h causing build failure with 2800bc08e4ab r12-6646
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104080 Jonathan Wakely changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|hp at gcc dot gnu.org |redi at gcc dot gnu.org
[Bug c++/104084] [12 regression] Internal compiler error: tree check: expected target_expr, have compound_expr in build_new_1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104084 --- Comment #2 from Allan Jensen --- Removing the (std::nothrow), and declaring the untagged new operator (instead of declaring them deleted), seems to work around the issue.
[Bug middle-end/104081] Variable optimized out despite -Og
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104081 --- Comment #4 from Richard Biener --- when I break at line 24 the data is still there but it's lost when unwinding frames from the SIGABRT: (gdb) bt #0 0x770cc18b in raise () from /lib64/libc.so.6 #1 0x770cd585 in abort () from /lib64/libc.so.6 #2 0x77a66016 in ?? () from /usr/lib64/libstdc++.so.6 #3 0x77a718dc in ?? () from /usr/lib64/libstdc++.so.6 #4 0x77a71947 in std::terminate() () from /usr/lib64/libstdc++.so.6 #5 0x77a71c3d in __cxa_rethrow () from /usr/lib64/libstdc++.so.6 #6 0x0040055f in throw_invalid (a=a@entry=0x4006aa "not a number", b=...) at t.C:6 #7 0x004005f8 in str_atoi (data=...) at t.C:26 #8 0x00400610 in main () at /usr/include/c++/11/bits/char_traits.h:371 is that what you mean?
[Bug c++/104084] [12 regression] Internal compiler error: tree check: expected target_expr, have compound_expr in build_new_1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104084 --- Comment #3 from Allan Jensen --- -v output: Using built-in specs. COLLECT_GCC=/opt/gcc/bin/g++-12 Target: x86_64-pc-linux-gnu Configured with: ../configure --enable-languages=c,c++ --prefix=/opt/gcc --program-suffix=-12 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.0.1 20220117 (experimental) (GCC) COLLECT_GCC_OPTIONS='-MMD' '-MF' 'obj/third_party/libgav1/libgav1/loop_restoration_info.o.d' '-D' 'USE_UDEV' '-D' 'USE_AURA=1' '-D' 'USE_NSS_CERTS=1' '-D' 'USE_OZONE=1' '-D' 'OFFICIAL_BUILD' '-D' 'TOOLKIT_QT' '-D' '_FILE_OFFSET_BITS=64' '-D' '_LARGEFILE_SOURCE' '-D' '_LARGEFILE64_SOURCE' '-D' 'NO_UNWIND_TABLES' '-D' 'NDEBUG' '-D' 'NVALGRIND' '-D' 'DYNAMIC_ANNOTATIONS_ENABLED=0' '-D' 'LIBGAV1_MAX_BITDEPTH=10' '-D' 'LIBGAV1_THREADPOOL_USE_STD_MUTEX' '-D' 'LIBGAV1_ENABLE_LOGGING=0' '-D' 'LIBGAV1_PUBLIC=' '-I' 'gen' '-I' '../../../../../../qtwebengine/src/3rdparty/chromium' '-I' '../../../../../../qtwebengine/src/3rdparty/chromium/third_party/libgav1/src' '-I' '../../../../../../qtwebengine/src/3rdparty/chromium/third_party/libgav1/src/src' '-fno-ident' '-fno-strict-aliasing' '--param=ssp-buffer-size=4' '-fstack-protector' '-Wno-unknown-pragmas' '-Wno-parentheses' '-Wno-sign-compare' '-Wstringop-overflow=0' '-Wno-stringop-overread' '-Wno-psabi' '-Wno-multichar' '-Wno-format-zero-length' '-fno-unwind-tables' '-fno-asynchronous-unwind-tables' '-fPIC' '-pipe' '-pthread' '-m64' '-O2' '-fno-omit-frame-pointer' '-g1' '-fvisibility=hidden' '-Wno-unused-local-typedefs' '-Wno-maybe-uninitialized' '-Wno-deprecated-declarations' '-fno-delete-null-pointer-checks' '-Wno-comment' '-Wno-packed-not-aligned' '-Wno-dangling-else' '-Wno-missing-field-initializers' '-Wno-unused-parameter' '-O2' '-fdata-sections' '-ffunction-sections' '-std=gnu++14' '-fvisibility-inlines-hidden' '-Wno-narrowing' '-Wno-attributes' '-Wno-class-memaccess' '-Wno-subobject-linkage' '-Wno-invalid-offsetof' '-Wno-return-type' '-Wno-deprecated-copy' '-c' '-o' 'obj/third_party/libgav1/libgav1/loop_restoration_info.o' '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'obj/third_party/libgav1/libgav1/' /opt/gcc/libexec/gcc/x86_64-pc-linux-gnu/12.0.1/cc1plus -quiet -v -I gen -I ../../../../../../qtwebengine/src/3rdparty/chromium -I ../../../../../../qtwebengine/src/3rdparty/chromium/third_party/libgav1/src -I ../../../../../../qtwebengine/src/3rdparty/chromium/third_party/libgav1/src/src -imultiarch x86_64-linux-gnu -MMD obj/third_party/libgav1/libgav1/loop_restoration_info.d -MF obj/third_party/libgav1/libgav1/loop_restoration_info.o.d -MQ obj/third_party/libgav1/libgav1/loop_restoration_info.o -D_GNU_SOURCE -D_REENTRANT -D USE_UDEV -D USE_AURA=1 -D USE_NSS_CERTS=1 -D USE_OZONE=1 -D OFFICIAL_BUILD -D TOOLKIT_QT -D _FILE_OFFSET_BITS=64 -D _LARGEFILE_SOURCE -D _LARGEFILE64_SOURCE -D NO_UNWIND_TABLES -D NDEBUG -D NVALGRIND -D DYNAMIC_ANNOTATIONS_ENABLED=0 -D LIBGAV1_MAX_BITDEPTH=10 -D LIBGAV1_THREADPOOL_USE_STD_MUTEX -D LIBGAV1_ENABLE_LOGGING=0 -D LIBGAV1_PUBLIC= ../../../../../../qtwebengine/src/3rdparty/chromium/third_party/libgav1/src/src/loop_restoration_info.cc -quiet -dumpdir obj/third_party/libgav1/libgav1/ -dumpbase loop_restoration_info.cc -dumpbase-ext .cc -m64 -mtune=generic -march=x86-64 -g1 -O2 -O2 -Wno-unknown-pragmas -Wno-parentheses -Wno-sign-compare -Wstringop-overflow=0 -Wno-stringop-overread -Wno-psabi -Wno-multichar -Wno-format-zero-length -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comment -Wno-packed-not-aligned -Wno-dangling-else -Wno-missing-field-initializers -Wno-unused-parameter -Wno-narrowing -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -Wno-invalid-offsetof -Wno-return-type -Wno-deprecated-copy -std=gnu++14 -version -fno-ident -fno-strict-aliasing -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -fno-omit-frame-pointer -fvisibility=hidden -fno-delete-null-pointer-checks -fdata-sections -ffunction-sections -fvisibility-inlines-hidden --param=ssp-buffer-size=4 -o - | as -v -I gen -I ../../../../../../qtwebengine/src/3rdparty/chromium -I ../../../../../../qtwebengine/src/3rdparty/chromium/third_party/libgav1/src -I ../../../../../../qtwebengine/src/3rdparty/chromium/third_party/libgav1/src/src --gdwarf-5 --64 -o obj/third_party/libgav1/libgav1/loop_restoration_info.o GNU assembler version 2.36.1 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.36.1 GNU C++14 (GCC) version 12.0.1 20220117 (experimental) (x86_64-pc-linux-gnu) compiled by GNU C version 12.0.1 20220117 (experimental), GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.0, isl version isl-0.23-GMP GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" ignoring nonexistent directory "/opt/gcc/lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../x86_64-pc-linux-gnu/include" #includ
[Bug c++/104084] [12 regression] Internal compiler error: tree check: expected target_expr, have compound_expr in build_new_1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104084 --- Comment #4 from Allan Jensen --- Created attachment 52217 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52217&action=edit -E output
[Bug c++/104084] [12 regression] Internal compiler error: tree check: expected target_expr, have compound_expr in build_new_1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104084 Richard Biener changed: What|Removed |Added Keywords||ice-on-valid-code Target Milestone|--- |12.0
[Bug libstdc++/104080] [12 Regression] newlib doesn't have endian.h causing build failure with 2800bc08e4ab r12-6646
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104080 --- Comment #5 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:97b9236976a4914d268089613d1fb42ece34aff9 commit r12-6664-g97b9236976a4914d268089613d1fb42ece34aff9 Author: Jonathan Wakely Date: Tue Jan 18 09:46:16 2022 + libstdc++: Fix deduction failure for std::min call [PR104080] libstdc++-v3/ChangeLog: PR libstdc++/104080 * src/c++17/fast_float/LOCAL_PATCHES: UPDATE. * src/c++17/fast_float/fast_float.h (round): Use explicit template argument list for std::min.
[Bug c++/104084] [12 regression] Internal compiler error: tree check: expected target_expr, have compound_expr in build_new_1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104084 Martin Liška changed: What|Removed |Added Status|WAITING |NEW Keywords||needs-bisection, ||needs-reduction --- Comment #5 from Martin Liška --- Reducing that right now, thanks for the test-case.
[Bug libstdc++/104085] New: mips: libstdc++ ABI check compares against wrong file if GCC is configured with --with-abi=(32|64)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104085 Bug ID: 104085 Summary: mips: libstdc++ ABI check compares against wrong file if GCC is configured with --with-abi=(32|64) Product: gcc Version: 11.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: xry111 at mengyan1223 dot wang Target Milestone: --- If GCC is configured with --with-abi={anything other than n32}, the directory layout produced by -print-multi-directory will be different with the layout of libstdc++-v3/config/abi/post/mips64-linux-gnu, causing ABI check failure.
[Bug libstdc++/104080] [12 Regression] newlib doesn't have endian.h causing build failure with 2800bc08e4ab r12-6646
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104080 --- Comment #6 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:8f6b62e0f0c99e421d07bf1847259744db22924b commit r12-6665-g8f6b62e0f0c99e421d07bf1847259744db22924b Author: Jonathan Wakely Date: Tue Jan 18 10:01:23 2022 + libstdc++: Use GCC's predefined macro for endianness [PR104080] Instead of hardcoded preprocessor conditionals with explicit target checks, just rely on the fact that __BYTE_ORDER__ is always defined by GCC. libstdc++-v3/ChangeLog: PR libstdc++/104080 * src/c++17/fast_float/LOCAL_PATCHES: Update. * src/c++17/fast_float/fast_float.h (FASTFLOAT_IS_BIG_ENDIAN): Define in terms of __BYTE_ORDER__.
[Bug tree-optimization/104086] New: ICE in lower_omp_target, at omp-low.c:13075
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104086 Bug ID: 104086 Summary: ICE in lower_omp_target, at omp-low.c:13075 Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: openacc Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com CC: tschwinge at gcc dot gnu.org Target Milestone: --- gcc 12.0.0 20220116 snapshot (g:90045c5df5b3c8853e7740fb72a11aead1c489bb) ICEs when compiling the following testcase, reduced from libgomp/testsuite/libgomp.oacc-c-c++-common/declare-vla.c, w/ -fopenacc --param openacc-kernels=decompose: void foo (void) { #pragma acc data { int i; #pragma acc kernels i = 0; } } % gcc-12.0.0 -fopenacc --param openacc-kernels=decompose -c n3ipdwdp.c during GIMPLE pass: omplower n3ipdwdp.c: In function 'foo': n3ipdwdp.c:8:9: internal compiler error: in lower_omp_target, at omp-low.c:13075 8 | #pragma acc kernels | ^~~ 0x7035f7 lower_omp_target /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/omp-low.c:13075 0xd773f1 lower_omp_1 /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/omp-low.c:14223 0xd773f1 lower_omp /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/omp-low.c:14362 0xd77d01 lower_omp_1 /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/omp-low.c:14152 0xd77d01 lower_omp /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/omp-low.c:14362 0xd77d01 lower_omp_1 /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/omp-low.c:14152 0xd77d01 lower_omp /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/omp-low.c:14362 0xd769b4 lower_omp_1 /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/omp-low.c:14139 0xd769b4 lower_omp /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/omp-low.c:14362 0xd71fc7 lower_omp_target /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/omp-low.c:12870 0xd773f1 lower_omp_1 /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/omp-low.c:14223 0xd773f1 lower_omp /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/omp-low.c:14362 0xd77d01 lower_omp_1 /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/omp-low.c:14152 0xd77d01 lower_omp /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/omp-low.c:14362 0xd7bdac execute_lower_omp /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/omp-low.c:14401 0xd7bdac execute /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/omp-low.c:14449
[Bug libstdc++/104080] [12 Regression] newlib doesn't have endian.h causing build failure with 2800bc08e4ab r12-6646
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104080 --- Comment #7 from Jonathan Wakely --- This should be fixed now.
[Bug c++/104087] New: Invoking a consteval constructor with new
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104087 Bug ID: 104087 Summary: Invoking a consteval constructor with new Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: fchelnokov at gmail dot com Target Milestone: --- In the following program ``` struct A { consteval A() {} }; int main() { new A(); // ok in GCC new A; //error in GCC } ``` GCC accepts the first new, but reject the second new. It is at least inconsistent. Demo: https://gcc.godbolt.org/z/onzeo6Peo According to this discussion https://stackoverflow.com/q/70743728/7325599 both `new`s are invalid.
[Bug middle-end/104081] Variable optimized out despite -Og
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104081 --- Comment #5 from Matthias Urlichs --- > when I break at line 24 the data is still there but it's lost > when unwinding frames from the SIGABRT: Yes, that's exactly the problem.
[Bug middle-end/104088] New: [12 Regression] '-O2' (or higher) GCN offloading (only) 'libgomp.oacc-c-c++-common/vprop.c' excess errors: 'warning: writing 1 byte into a region of size 0 [-Wstringop-ove
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104088 Bug ID: 104088 Summary: [12 Regression] '-O2' (or higher) GCN offloading (only) 'libgomp.oacc-c-c++-common/vprop.c' excess errors: 'warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]' Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: diagnostic, openacc Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: tschwinge at gcc dot gnu.org CC: ams at gcc dot gnu.org, jules at gcc dot gnu.org, msebor at gcc dot gnu.org Target Milestone: --- Target: gcn The recent commit r12-6592-g72332337e3d8acbb21398b8d123f1bfe77a8327e "Use enclosing object size if it's smaller than member [PR 101475]" causes a regression with '-O2' (or higher) GCN offloading (only): PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/vprop.c -DACC_DEVICE_TYPE_radeon=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 (test for excess errors) PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/vprop.c -DACC_DEVICE_TYPE_radeon=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 execution test [-PASS:-]{+FAIL:+} libgomp.oacc-c/../libgomp.oacc-c-c++-common/vprop.c -DACC_DEVICE_TYPE_radeon=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (test for excess errors) PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/vprop.c -DACC_DEVICE_TYPE_radeon=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 execution test In function 'test_char._omp_fn.0': lto1: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] lto1: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] PASS: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/vprop.c -DACC_DEVICE_TYPE_radeon=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 (test for excess errors) PASS: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/vprop.c -DACC_DEVICE_TYPE_radeon=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 execution test [-PASS:-]{+FAIL:+} libgomp.oacc-c++/../libgomp.oacc-c-c++-common/vprop.c -DACC_DEVICE_TYPE_radeon=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (test for excess errors) PASS: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/vprop.c -DACC_DEVICE_TYPE_radeon=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 execution test In function '_Z9test_charv._omp_fn.0': lto1: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] lto1: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] There is no (!) meaningful difference if good vs. bad '-foffload=amdgcn-amdhsa=-fdump-tree-all\ -fdump-ipa-all\ -fdump-rtl-all' dump files. I'm happy to supply any dump files etc. to help resolve this.
[Bug c++/77307] Bring memset + free optimisation to C++
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77307 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2022-01-18 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski --- Confirmed.
[Bug ipa/101941] [12 Regression] Linux kernel build failure due to retaining fnsplit fragment with __attribute__((__error__))
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101941 --- Comment #30 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:76fe494230477a69f8fa8c8ca2d493acaf343eb1 commit r12--g76fe494230477a69f8fa8c8ca2d493acaf343eb1 Author: Andrew Pinski Date: Wed Nov 17 02:45:22 2021 + Fix tree-optimization/101941: IPA splitting out function with error attribute The Linux kernel started to fail compile when the jump threader was improved (r12-2591-g2e96b5f14e4025691). This failure was due to the IPA splitting code decided now to split off the basic block which contained two functions, one of those functions included the error attribute on them. This patch fixes the problem by disallowing basic blocks from being split which contain functions that have either the error or warning attribute on them. The two new testcases are to make sure we still split the function for other places if we reject the one case. Committed as approved after Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/101941 gcc/ChangeLog: * ipa-split.cc (visit_bb): Disallow function calls where the function has either error or warning attribute. gcc/testsuite/ChangeLog: * gcc.c-torture/compile/pr101941-1.c: New test. * gcc.dg/tree-ssa/pr101941-1.c: New test.
[Bug ipa/101941] [12 Regression] Linux kernel build failure due to retaining fnsplit fragment with __attribute__((__error__))
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101941 Andrew Pinski changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #31 from Andrew Pinski --- Fixed.
[Bug ipa/102361] Errors compiling Linux kernel 5.14 with CONFIG_FORTIFY=y
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102361 Bug 102361 depends on bug 101941, which changed state. Bug 101941 Summary: [12 Regression] Linux kernel build failure due to retaining fnsplit fragment with __attribute__((__error__)) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101941 What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED
[Bug analyzer/104089] New: ICE in constant_svalue, at analyzer/svalue.h:271
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104089 Bug ID: 104089 Summary: ICE in constant_svalue, at analyzer/svalue.h:271 Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- gcc 12.0.0 20220116 snapshot (g:90045c5df5b3c8853e7740fb72a11aead1c489bb) ICEs when compiling the following testcase, reduced from gcc/testsuite/gcc.dg/torture/float16-tg-3.c, w/ -fanalyzer -frounding-math: volatile _Float16 true_min = 5.9604644775390625000e-8F16; int main (void) { return __builtin_fpclassify (0, 1, 4, 3, 2, true_min); } % gcc-12.0.0 -fanalyzer -frounding-math -c caqiocbw.c during IPA pass: analyzer caqiocbw.c: In function 'main': caqiocbw.c:6:10: internal compiler error: in constant_svalue, at analyzer/svalue.h:271 6 | return __builtin_fpclassify (0, 1, 4, 3, 2, true_min); | ^~~~ 0x7b22a8 ana::constant_svalue::constant_svalue(tree_node*) /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/svalue.h:271 0x7b22a8 ana::region_model_manager::get_or_create_constant_svalue(tree_node*) /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/region-model-manager.cc:216 0x12a37da ana::region_model_manager::get_or_create_unaryop(tree_node*, tree_code, ana::svalue const*) /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/region-model-manager.cc:441 0x128ba67 ana::region_model::on_assignment(gassign const*, ana::region_model_context*) /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/region-model.cc:870 0x1265bc8 ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode const*, gimple const*, ana::program_state*, ana::uncertainty_t*, ana::path_context*) /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/engine.cc:1305 0x1268ff6 ana::exploded_graph::process_node(ana::exploded_node*) /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/engine.cc:3694 0x1269fea ana::exploded_graph::process_worklist() /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/engine.cc:3137 0x126c670 ana::impl_run_checkers(ana::logger*) /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/engine.cc:5716 0x126d56e ana::run_checkers() /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/engine.cc:5787 0x125c2a8 execute /var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/analyzer-pass.cc:87
[Bug middle-end/101292] [12 Regression] recent valgrind error in warning-control.cc since r12-1804-g65870e75616ee4359d1c13b99be794e6a577bc65
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101292 --- Comment #10 from rguenther at suse dot de --- On Mon, 17 Jan 2022, tschwinge at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101292 > > Thomas Schwinge changed: > >What|Removed |Added > > CC||tschwinge at gcc dot gnu.org > > --- Comment #9 from Thomas Schwinge --- > (In reply to CVS Commits from comment #7) > > The warning control falls into the C++ trap of using a reference > > to old hashtable contents for a put operation which can end up > > re-allocating that before reading from the old freed referenced to > > source. Fixed by introducing a temporary. > > What the heck... I'd so much looked into this code and even refactored it in > context of my earlier commit > r12-3498-g6c79057fae6bbb36c4a4fd61c5b7107a16b71b17 > "Don't maintain a warning spec for 'UNKNOWN_LOCATION'/'BUILTINS_LOCATION' > [PR101574]" -- but I had not noticed that pre-existing problem. Thanks, > Richard! I've only noticed because I (repeatedly...) did the same mistake elsewhere.
[Bug c++/104087] Invoking a consteval constructor with new
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104087 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org, ||jason at gcc dot gnu.org --- Comment #1 from Jakub Jelinek --- For build_over_call, the difference is that in the first case obj_arg satisfies is_dummy_arg (so we create a TARGET_EXPR for it) while in the second case it doesn't so in that case we evaluate A::A ((struct A *) D.2164) and only the latter fails. If both are invalid, we'd need to reject it somewhere earlier, but e.g. build_new_1 on the other side doesn't know that the ctor is immediate. Jason, any thoughts on this?
[Bug target/103771] [12 Regression] Missed vectorization under -mavx512f -mavx512vl after r12-5489
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771 --- Comment #23 from rguenther at suse dot de --- On Tue, 18 Jan 2022, crazylht at gmail dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771 > > --- Comment #22 from Hongtao.liu --- > (In reply to Hongtao.liu from comment #21) > > (In reply to Hongtao.liu from comment #20) > > > (In reply to Richard Biener from comment #19) > > > > Ah, so the issue is missing -mavx512bw which means we end up with a AVX2 > > > > style > > > > mask for V32QImode. With -mavx512bw the code vectorizes fine. > > > > > > Vectorization code is worse than before, now we need to pack vectorized > > > mask > > > which takes extra 3 instructions. > > > > Current ifcvt convert > > > > -dump of .ch_vect--- > > if (x.1_14 > 255) > > goto ; [50.00%] > > else > > goto ; [50.00%] > > > >[local count: 477815112]: > > _17 = -_5; > > _18 = _17 >> 31; > > iftmp.0_19 = (unsigned char) _18; > > goto ; [100.00%] > > > >[local count: 477815112]: > > iftmp.0_20 = (unsigned char) _5; > > > >[local count: 955630225]: > > # iftmp.0_21 = PHI > > ---dump end- > > > > > > to > > dump of .ifcvt- > > _41 = -x.1_14; > > _17 = (int) _41; > > _18 = _17 >> 31; > > iftmp.0_19 = (unsigned char) _18; -- vec_pack_trunc > > iftmp.0_20 = (unsigned char) _5; -- vec_pack_trunc > > iftmp.0_21 = x.1_14 > 255 ? iftmp.0_19 : iftmp.0_20; -- vec_pack_trunc > > *_6 = iftmp.0_21; > > x_16 = x_24 + 1; > > -dump end-- > > > > > > if ifcvt output things like > > optimal .ifcvt-- > > _41 = -x.1_14; > > _17 = (int) _41; > > _18 = _17 >> 31; > > iftmp.0_21 = x.1_14 > 255 ? _18 : _5; > > iftmp.0_22 = (unsigned char) iftmp.0_21; --- vec_pack_trunc > > *_6 = iftmp.0_22; > > x_16 = x_24 + 1; > > end > > > > we can save operations for packing mask(3 vec_pack_trunc vs 1 > > vec_pack_trunc?). > > Or maybe a gimple simplification for it? Yes, I think that's a candidate for a match.pd simplification. Fortunately if-conversion already folds the built stmts.
[Bug target/103771] [12 Regression] Missed vectorization under -mavx512f -mavx512vl after r12-5489
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771 Andrew Pinski changed: What|Removed |Added CC||pinskia at gcc dot gnu.org --- Comment #24 from Andrew Pinski --- Note phiopt has code which is supposed to factor out the cast but many reasons, I have noticed it almost never does it (I still don't understand the cases when it does and when it does not yet). This was something which I was going to fix for GCC 13.
[Bug target/104090] New: [10/11/12 Regression] powerpc: asm machine directive wrong for FSL processors
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104090 Bug ID: 104090 Summary: [10/11/12 Regression] powerpc: asm machine directive wrong for FSL processors Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: sebastian.hu...@embedded-brains.de Target Milestone: --- The latest GCC 10/11/12 branches do not build the powerpc-rtems target due to a build error in the -mcpu=8540 multilib: /tmp/sh/b-gcc-powerpc-rtems6/./gcc/xgcc -B/tmp/sh/b-gcc-powerpc-rtems6/./gcc/ -nostdinc -B/tmp/sh/b-gcc-powerpc-rtems6/powerpc-rtems6/m8540/nof/newlib/ -isystem /tmp/sh/b-gcc-powerpc-rtems6/powerpc-rtems6/m8540/nof/newlib/targ-include -isystem /home/EB/sebastian_h/src/gcc/newlib/libc/include -B/tmp/sh/i-powerpc-rtems6/powerpc-rtems6/bin/ -B/tmp/sh/i-powerpc-rtems6/powerpc-rtems6/lib/ -isystem /tmp/sh/i-powerpc-rtems6/powerpc-rtems6/include -isystem /tmp/sh/i-powerpc-rtems6/powerpc-rtems6/sys-include -mcpu=8540 -msoft-float -g -O2 -O2 -I/home/EB/sebastian_h/src/gcc/libgcc/../newlib/libc/sys/rtems/include -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -I. -I. -I../../../.././gcc -I/home/EB/sebastian_h/src/gcc/libgcc -I/home/EB/sebastian_h/src/gcc/libgcc/. -I/home/EB/sebastian_h/src/gcc/libgcc/../gcc -I/home/EB/sebastian_h/src/gcc/libgcc/../include -DHAVE_CC_TLS -o _negvdi2.o -MT _negvdi2.o -MD -MP -MF _negvdi2.dep -DL_negvdi2 -c /home/EB/sebastian_h/src/gcc/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS /tmp/ccZJ18fW.s: Assembler messages: /tmp/ccZJ18fW.s:24: Error: unrecognized opcode: `isel' make: *** [Makefile:501: _negvdi2.o] Error 1 The assembler is called like this: /tmp/sh/b-gcc-powerpc-rtems6/./gcc/as -I /home/EB/sebastian_h/src/gcc/libgcc/../newlib/libc/sys/rtems/include -I . -I . -I ../../../.././gcc -I /home/EB/sebastian_h/src/gcc/libgcc -I /home/EB/sebastian_h/src/gcc/libgcc/. -I /home/EB/sebastian_h/src/gcc/libgcc/../gcc -I /home/EB/sebastian_h/src/gcc/libgcc/../include -a32 -me500 -mbig -o _negvdi2.o _negvdi2.s Using -me500 seems to be all right, however, the file contains a machine directive: .file"libgcc2.c" .machine ppc .section".text" If I remove the ".machine ppc" by hand, the file can be assembled with the above command line. The affect of the patch for PR100108 is: diff -u _negvdi2.s.before _negvdi2.s.after --- _negvdi2.s.before 2022-01-11 09:07:43.313828636 +0100 +++ _negvdi2.s.after2022-01-11 08:54:08.424946502 +0100 @@ -1,5 +1,5 @@ .file "libgcc2.c" - .machine power9 + .machine ppc .section".text" .Ltext0: .align 2
[Bug c++/104091] New: -std=c++20 causing meaningless error message "'auto' not allowed in alias declaration" which should be "missing template arguments after ..."
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104091 Bug ID: 104091 Summary: -std=c++20 causing meaningless error message "'auto' not allowed in alias declaration" which should be "missing template arguments after ..." Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nickhuang99 at hotmail dot com Target Milestone: --- considering following snippet of code: templatetypename Template> struct Specialization{}; templatetypename Template, typename...Args> struct Specialization, Template>{ using type=Template; }; Using -std=c++20 gives meaningless error message of "'auto' not allowed in alias declaration". While -std=c++17 or before all give correct error message: "missing template arguments after 'Template<...auto...>'". And -std=c++14 is even better with "invalid use of template-name 'Template' without an argument list". See https://godbolt.org/z/Wb9nKzcPT
[Bug tree-optimization/104082] Wdangling-pointer: 2 * false positive ?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104082 --- Comment #4 from David Binderman --- I just tried compiling a recent linux kernel with the new gcc trunk and the warning appeared seven times. Only one of them was a proper bug, which I have reported. The rest were false positives. So this warning occasionally produces something useful, so it can't be simply temporarily ignored until it works properly. I suggest it gets taken out of -Wall and -Wextra until it works a bit better.
[Bug c++/104091] -std=c++20 causing meaningless error message "'auto' not allowed in alias declaration" which should be "missing template arguments after ..."
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104091 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2022-01-18 Ever confirmed|0 |1 Keywords||diagnostic Status|UNCONFIRMED |NEW --- Comment #1 from Andrew Pinski --- Confirmed reduced to just: template class Tt; using type=Tt;
[Bug libstdc++/101124] [12 Regression] pair(0, 0) was intended to be deprecated, but is rejected now
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101124 --- Comment #1 from Jonathan Wakely --- Another example that now fails: #include struct X { } x; std::pair p(x, 0); This selects the pair::pair(U1&&, U2&&) constructor, because x is non-const and the pair::first_type type is const. U2 gets deduced as int, and int cannot convert to a pointer. This code is just wrong and the standard says it should not compile, it should be fixed to use p(x, nullptr). p(std::as_const(x), 0) would also work, but is gross. Just use nullptr.
[Bug tree-optimization/104017] unexpeted -Warray-bounds popping a fixed number of std::deque elements
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104017 Lars Gullik Bjønnes changed: What|Removed |Added CC||larsbj at gullik dot net --- Comment #2 from Lars Gullik Bjønnes --- (In reply to Martin Sebor from comment #1) ... > #include > > struct Node { Node const * parent = nullptr; }; > > void func(Node const * n) > { > std::deque p; > > Node const * e = n; > > while (e != nullptr) { > p.push_front(e); > e = e->parent; > } > > if (p.size ()) > p.pop_front(); > if (p.size ()) > p.pop_front(); > if (p.size ()) > p.pop_back(); > } > > > This test case also triggers a warning, for the same reason: GCC can't > determine the relationship between a deque's internal node pointers and the > result of std::deque::size() (which is a function of the node pointers). This is also the case amended with a check that the std::deque::size is large enough (for the same reason). In that case the crash can never happen, still GCC12 warns/errors. I agree that the first test case, and the warning from it, is helpful. However this second one not so much.
[Bug middle-end/104092] New: [12 Regression] Invalid -Wdangling-pointer warning after writes by calls
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104092 Bug ID: 104092 Summary: [12 Regression] Invalid -Wdangling-pointer warning after writes by calls Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: rsandifo at gcc dot gnu.org Target Milestone: --- Compiling the following testcase with -march=armv8.2-a+sve -O2 -Wall: #include svuint64_t bar(svbool_t pg, const uint64_t *addr) { return svget2(svld2_u64(pg, addr), 0); } triggers: foo.c:4:16: warning: using a dangling pointer to an unnamed temporary [-Wdangling-pointer=] 4 | return svget2(svld2_u64(pg, addr), 0); | ~~^~~~ foo.c:4:16: note: unnamed temporary defined here 4 | return svget2(svld2_u64(pg, addr), 0); | ~~^~~~ This is because the code looks only at gassigns when tracking whether a clobber has been overwritten, so it misses assignments by calls. This seems to be different from PR104076.
[Bug middle-end/104092] [12 Regression] Invalid -Wdangling-pointer warning after writes by calls
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104092 rsandifo at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |rsandifo at gcc dot gnu.org Last reconfirmed||2022-01-18 --- Comment #1 from rsandifo at gcc dot gnu.org --- Testing a patch.
[Bug target/104090] [10/11/12 Regression] powerpc: asm machine directive wrong for FSL processors
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104090 Richard Biener changed: What|Removed |Added Target Milestone|--- |10.4
[Bug middle-end/104088] [12 Regression] '-O2' (or higher) GCN offloading (only) 'libgomp.oacc-c-c++-common/vprop.c' excess errors: 'warning: writing 1 byte into a region of size 0 [-Wstringop-overflow
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104088 Richard Biener changed: What|Removed |Added Target Milestone|--- |12.0
[Bug target/104090] [10/11/12 Regression] powerpc: asm machine directive wrong for FSL processors
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104090 --- Comment #1 from Sebastian Huber --- I work on a patch, see: https://gcc.gnu.org/pipermail/gcc-patches/2022-January/588641.html
[Bug modula2/104065] [12 Regression] trunk 20220117 fails to build modula2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104065 --- Comment #2 from Gaius Mulley --- Thanks for the hint. I've now renamed the .c files to .cc and adjusted the Make-lang.in and waiting for the full bootstrap to complete before pushing changes.
[Bug c++/104093] New: Make -Wvexing-parse warn on declaration of void functions as well
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104093 Bug ID: 104093 Summary: Make -Wvexing-parse warn on declaration of void functions as well Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: doodspav at gmail dot com Target Milestone: --- Right now G++ with -Wvexing-parse will warn about this: void fn() { int x(); } but not this: void fn() { void x(); } While the former is much more likely to occur than the latter, I have seen the latter happen in practice and it would be nice for the warning to cover this too.
[Bug modula2/101388] Unconditional use of __MAX_BAUD
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101388 Gaius Mulley changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --- Comment #6 from Gaius Mulley --- Marking as resolved as the patch has been applied.
[Bug middle-end/101292] [12 Regression] recent valgrind error in warning-control.cc since r12-1804-g65870e75616ee4359d1c13b99be794e6a577bc65
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101292 --- Comment #11 from David Binderman --- (In reply to Thomas Schwinge from comment #9) > (In reply to CVS Commits from comment #7) > > The warning control falls into the C++ trap of using a reference > > to old hashtable contents for a put operation which can end up > > re-allocating that before reading from the old freed referenced to > > source. Fixed by introducing a temporary. > > What the heck... I'd so much looked into this code and even refactored it > in context of my earlier commit > r12-3498-g6c79057fae6bbb36c4a4fd61c5b7107a16b71b17 "Don't maintain a warning > spec for 'UNKNOWN_LOCATION'/'BUILTINS_LOCATION' [PR101574]" -- but I had not > noticed that pre-existing problem. Thanks, Richard! > > > In the general case, this is probably too complex to get a reliable > diagnostic for (say, GCC Analyzer)? I had a look for the reallocate in put but couldn't see it. Does someone perhaps have a small chunk of C++ that demonstrates the trap ? If the analyser doesn't do it already, it ought to.
[Bug middle-end/101292] [12 Regression] recent valgrind error in warning-control.cc since r12-1804-g65870e75616ee4359d1c13b99be794e6a577bc65
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101292 --- Comment #12 from rguenther at suse dot de --- On Tue, 18 Jan 2022, dcb314 at hotmail dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101292 > > --- Comment #11 from David Binderman --- > (In reply to Thomas Schwinge from comment #9) > > (In reply to CVS Commits from comment #7) > > > The warning control falls into the C++ trap of using a reference > > > to old hashtable contents for a put operation which can end up > > > re-allocating that before reading from the old freed referenced to > > > source. Fixed by introducing a temporary. > > > > What the heck... I'd so much looked into this code and even refactored it > > in context of my earlier commit > > r12-3498-g6c79057fae6bbb36c4a4fd61c5b7107a16b71b17 "Don't maintain a warning > > spec for 'UNKNOWN_LOCATION'/'BUILTINS_LOCATION' [PR101574]" -- but I had not > > noticed that pre-existing problem. Thanks, Richard! > > > > > > In the general case, this is probably too complex to get a reliable > > diagnostic for (say, GCC Analyzer)? > > I had a look for the reallocate in put but couldn't see it. It's m_table::expand () that will use data_alloc from the allocator which eventually ends up in xcalloc and ::free for the release. Everything is in templates so it should be visible to the analyzer.
[Bug middle-end/104092] [12 Regression] Invalid -Wdangling-pointer warning after writes by calls
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104092 Richard Biener changed: What|Removed |Added Target Milestone|--- |12.0 Keywords||diagnostic
[Bug c++/104084] [12 regression] Internal compiler error: tree check: expected target_expr, have compound_expr in build_new_1 since r12-6375-g6cd51207f5732b52
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104084 Martin Liška changed: What|Removed |Added Priority|P3 |P1 Summary|[12 regression] Internal|[12 regression] Internal |compiler error: tree check: |compiler error: tree check: |expected target_expr, have |expected target_expr, have |compound_expr in|compound_expr in |build_new_1 |build_new_1 since ||r12-6375-g6cd51207f5732b52 Keywords|needs-bisection,|rejects-valid |needs-reduction | CC||jason at gcc dot gnu.org --- Comment #6 from Martin Liška --- Started with r12-6375-g6cd51207f5732b52. Reduced test-case: $ cat pr104084.C int nothrow; struct MaxAlignedAllocable { void *operator new[](unsigned long, int); void operator delete[](void *); long Resize_size; void Resize() { new (nothrow) MaxAlignedAllocable[Resize_size]; } };
[Bug libstdc++/104080] [12 Regression] newlib doesn't have endian.h causing build failure with 2800bc08e4ab r12-6646
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104080 Hans-Peter Nilsson changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #8 from Hans-Peter Nilsson --- (In reply to Jonathan Wakely from comment #7) > This should be fixed now. Confirmed (autotester has completed a build at r12-6665-g8f6b62e0f0c9). Closing. Thanks!
[Bug bootstrap/103974] [12 Regression] ICE in ira_flattening building libstdc++ with r12-6415-g01f3e6a40e72
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103974 --- Comment #11 from Hans-Peter Nilsson --- Yes, thanks for the quick resolution.
[Bug target/104005] [12 Regression] Regression on aarch64+sve with -O2 -fPIC since r12-5204
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104005 --- Comment #5 from CVS Commits --- The master branch has been updated by Richard Sandiford : https://gcc.gnu.org/g:38ec23fafb167ddfe840d7bb22b3e943d8a7d29e commit r12-6669-g38ec23fafb167ddfe840d7bb22b3e943d8a7d29e Author: Richard Sandiford Date: Tue Jan 18 12:20:00 2022 + aarch64: Fix overly optimistic LDP/STP matching [PR104005] In g:526e1639aa76b0a8496b0dc3a3ff2c450229544e I'd added support for finding more consecutive MEMs. However, the check was too eager, in that it matched MEM_REFs with the same base address even if that base address was an arbitrary SSA name. This can give wrong results if a MEM_REF from one loop iteration is compared with a MEM_REF from another (e.g. after rtl unrolling). In principle, we could still accept MEM_REFs based on the same incoming SSA name, but there seems to be no out-of-the-box API for doing that. Adding a new one at this stage in GCC 12 doesn't feel like a good risk/reward trade-off. This patch therefore restricts the MEM_EXPR comparison to base decls only, excluding all MEM_REFs. It means we lose all the new STPs in the PR testcase but keep the ones in the original stp_1.c testcase. gcc/ PR target/104005 * config/aarch64/aarch64.cc (aarch64_check_consecutive_mems): When using MEM_EXPR, require the base to be a decl. gcc/testsuite/ PR target/104005 * gcc.target/aarch64/pr104005.c: New test.
[Bug target/104005] [12 Regression] Regression on aarch64+sve with -O2 -fPIC since r12-5204
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104005 rsandifo at gcc dot gnu.org changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #6 from rsandifo at gcc dot gnu.org --- Fixed on trunk. Thanks for catching this before the GCC 12 release.
[Bug middle-end/103987] [12 Regression] ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 since r12-5236-g5aa91072e24c1e16
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103987 Richard Biener changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #5 from Richard Biener --- I am testing a patch.
[Bug tree-optimization/104086] ICE in lower_omp_target, at omp-low.c:13075
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104086 Martin Liška changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED |NEW CC||marxin at gcc dot gnu.org Last reconfirmed||2022-01-18
[Bug c++/104025] [12 Regression] '-fcompare-debug' failure with enabled warnings since r12-6563-gb8ffa71e4271ae56
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104025 --- Comment #7 from Jakub Jelinek --- Maybe. But how? Would it push a pair of next_token, input_location ? I think it isn't easy to recompute input_location after the rollback otherwise. And, I'm a little bit worried that such a change could be at this point quite dangerous, while the above patch affects one spot that has changed, we have lots of rollbacks in various places. Anyway, patch passed bootstrap/regtest.
[Bug tree-optimization/103989] [12 regression] std::optional and bogus -Wmaybe-unitialized at -Og since r12-1992-g6feb628a706e86eb
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103989 Richard Biener changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
[Bug c++/102041] Pretty printing of variable templates could be improved
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102041 Jonathan Wakely changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed||2022-01-18
[Bug c++/86369] constexpr const char* comparison fails
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86369 Jason Merrill changed: What|Removed |Added CC||jason at gcc dot gnu.org --- Comment #8 from Jason Merrill --- (In reply to Nicolas Lesser from comment #1) > For clarity, b1 shouldn't compile. > > [lex.string]p16 says: "whether successive evaluations of a string-literal > yield the same or a different object is unspecified." > > [expr.const]p2 says: "An expression e is a core constant expression unless > the evaluation of e, [...], would evaluate one of the following expressions: > [...]; a relational or equality operator where the result is unspecified;" I think the second quote refers to places in [expr.eq] that say "the result is unspecified", not to all instances of unspecified behavior in the standard.
[Bug c++/104094] New: Alias template shown in diagnostic with wrong template parameter name
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104094 Bug ID: 104094 Summary: Alias template shown in diagnostic with wrong template parameter name Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- template struct trait; template struct trait { using type = A; }; template struct cond { static constexpr bool value = true; }; template struct enable_if { using type = bool; }; template<> struct enable_if { }; template class pair { template using constraint = cond>; template::value>::type = true> pair(E&&) { } }; pair p(1); GCC prints: name.C:18:14: error: 'pair::pair(E&&) [with E = int; typename enable_if >::value>::type = true; C = int]' is private within this context 18 | pair p(1); | ^ name.C:15:5: note: declared private here 15 | pair(E&&) { } | ^~~~ Why does it show cond> in the error? There is no D in that constructor's parameter list, and D is not explained in the [with ...] template arg list. I think it should be shown as constraint or as cond>, but showing D is just confusing.
[Bug c++/54948] template unnecessarily displayed as "A< template-parameter-1-1 >" not "A"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54948 Jonathan Wakely changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=104094 --- Comment #5 from Jonathan Wakely --- This continues to be annoying. Libstdc++ has loads of forward declarations of templates, e.g. in : // Forward declarations template struct is_reference; template struct is_function; template struct is_void; template struct remove_cv; template struct is_const; Which means we then get diagnostics containing: std::is_same<_U1, typename std::remove_cv< >::type&> I agree with Manu that this could just show "typename" here. We don't refer to the template-parameter-1-1 type again in the diagnostic, so why do we care about uniquely identifying it as 1-1? But why is it even using the name from the remove_cv declaration? That should not be appearing in the *use* of remove_cv here. I've filed that as PR 104094.
[Bug c++/104084] [12 regression] Internal compiler error: tree check: expected target_expr, have compound_expr in build_new_1 since r12-6375-g6cd51207f5732b52
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104084 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #7 from Jakub Jelinek --- (In reply to Martin Liška from comment #6) > Started with r12-6375-g6cd51207f5732b52. > > Reduced test-case: > > $ cat pr104084.C > int nothrow; > struct MaxAlignedAllocable { > void *operator new[](unsigned long, int); > void operator delete[](void *); > long Resize_size; > void Resize() { new (nothrow) MaxAlignedAllocable[Resize_size]; } > }; Better not hardcode a particular size_t (for more recent standard versions one could use decltype (sizeof 0) too). int nothrow; struct MaxAlignedAllocable { void *operator new[](__SIZE_TYPE__, int); void operator delete[](void *); long Resize_size; void Resize() { new (nothrow) MaxAlignedAllocable[Resize_size]; } };
[Bug ipa/101354] [11 regression] naked function mishandled - store optimized away
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101354 --- Comment #9 from CVS Commits --- The releases/gcc-11 branch has been updated by Martin Liska : https://gcc.gnu.org/g:806d0ce8cb0c1b690e6b5774a5eb3a1404a21253 commit r11-9477-g806d0ce8cb0c1b690e6b5774a5eb3a1404a21253 Author: Martin Liska Date: Thu Aug 12 17:26:51 2021 +0200 ipa: "naked" attribute implies "noipa" attribute PR ipa/101354 gcc/ChangeLog: * attribs.c (decl_attributes): Make naked functions "noipa" functions. (cherry picked from commit 4998404915bba9cb04c438a926cdf7126782a767)
[Bug c++/101221] Inaccurate error message for wrong template alias
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101221 Jonathan Wakely changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed||2022-01-18 --- Comment #1 from Jonathan Wakely --- The code from the attachment is: namespace One { typedef enum { A, B } Type; template class AClass; template class AClass { }; template class AClass { }; } typedef One::Type NewType; template using OtherNew = One::AClass; class BClass { typedef One::Type Type; template using New = One::AClass; }; With -std=gnu++17 we print: 101221.C:16:18: error: missing template arguments after 'AClass<...auto...>' 16 | using OtherNew = One::AClass; | ^~~ 101221.C:4:43: note: 'template class One::AClass' declared here 4 | template class AClass; | ^~ 101221.C:23:17: error: missing template arguments after 'AClass<...auto...>' 23 | using New = One::AClass; | ^~~ 101221.C:4:43: note: 'template class One::AClass' declared here 4 | template class AClass; | ^~ With -std=gnu++20 we print: 101221.C:16:18: error: 'auto' not allowed in alias declaration 16 | using OtherNew = One::AClass; | ^~~ 101221.C:23:17: error: 'auto' not allowed in alias declaration 23 | using New = One::AClass; | ^~~ Both diagnostics are wrong. Clang prints the same error for C++17 and C++20.
[Bug ipa/101354] [11 regression] naked function mishandled - store optimized away
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101354 Martin Liška changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #10 from Martin Liška --- Fixed.
[Bug middle-end/103987] [12 Regression] ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 since r12-5236-g5aa91072e24c1e16
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103987 --- Comment #6 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:3ed40db0f12994e64434dc2e0590ba1da7ba5f60 commit r12-6672-g3ed40db0f12994e64434dc2e0590ba1da7ba5f60 Author: Richard Biener Date: Tue Jan 18 13:26:22 2022 +0100 tree-optimization/103987 - guard DSE modref query This adds a missing guard for a pointer to the DSE modref query, otherwise we can end up invoking APIs desired to only work on pointers on non-pointers when there are mismatches between declared and actual arguments of functions in the program. 2022-01-18 Richard Biener PR tree-optimization/103987 * tree-ssa-dse.cc (dse_optimize_call): Properly guard modref query with a pointer check. * gcc.dg/torture/pr103987.c: New testcase.
[Bug middle-end/103987] [12 Regression] ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 since r12-5236-g5aa91072e24c1e16
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103987 Richard Biener changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #7 from Richard Biener --- Fixed.
[Bug target/103676] [10/11/12 Regression] internal compiler error: in extract_constrain_insn, at recog.c:2671
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103676 --- Comment #23 from Vladimir Makarov --- (In reply to Jakub Jelinek from comment #22) > If we consider such an inline asm invalid, we could error on it, ICE is not > the right thing. But what exactly should we error on? Alternative I think it is better to fix it in LRA than describing the semantics. I am starting to work on it and will look how the fix is going. If it is too complicated, we could try another solution (with describing the current semantics). In any case, I think it is not worth to fix the same existing problem in the old reload pass. > containing multiple register classes for multi-word operands is still > something used quite commonly in real-world, the problem is when the RA > assigns it a reg spanning across those. Or do most backends restrict > multi-word regs to start at a reg number divisible by the number of words > they need?
[Bug tree-optimization/104058] [12 Regression] 6-7% x264_r regression with -march=native -Ofast -funroll-loops -flto on x86 since r12-6420-gd3ff7420e941931d32ce2e332e7968fe67ba20af
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104058 Richard Biener changed: What|Removed |Added Status|NEW |WAITING Depends on||103997 --- Comment #3 from Richard Biener --- Waiting for the PR103997 fix, please re-evaluate after that bug is closed. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103997 [Bug 103997] [12 Regression] gcc.target/i386/pr88531-??.c scan-assembler-times FAILs
[Bug rtl-optimization/104054] [9/10/11/12 Regression] '-fcompare-debug' failure (length) w/ -Os -funroll-loops since r8-3946-gfe94440235cfaa57
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104054 Richard Biener changed: What|Removed |Added Priority|P3 |P2
[Bug rtl-optimization/104049] [12 Regression] vec_select to subreg lowering causes superfluous moves
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104049 Richard Biener changed: What|Removed |Added CC||vmakarov at gcc dot gnu.org Priority|P3 |P1 --- Comment #2 from Richard Biener --- We need to understand the issue at least.
[Bug target/104039] [9/10/11/12 Regression] AArch64 Redundant instruction moving general to vector register
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104039 Richard Biener changed: What|Removed |Added Priority|P3 |P2
[Bug c++/104095] New: g++ diagnosis may use non-standard terminology: "constant" instead of "literal", "integer" instead of "integral"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104095 Bug ID: 104095 Summary: g++ diagnosis may use non-standard terminology: "constant" instead of "literal", "integer" instead of "integral" Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pavel.morozkin at gmail dot com Target Milestone: --- $ g++ t589.cpp -std=c++17 -pedantic -Wall -Wextra -c t589.cpp:24:22: error: overflow in constant expression [-fpermissive] 24 | enum { y = (int)(1e10) }; | ^ t589.cpp:24:22: error: overflow in constant expression [-fpermissive] t589.cpp:24:22: error: enumerator value for ‘y’ is not an integer constant С++ standard does not have "integer constant". С++ standard has "integral constant". $ g++ t589.cpp -std=c++11 -pedantic -c t589.cpp:25:11: warning: use of C++17 hexadecimal floating constant 25 | float f = 0x0.123p-1f; С++ standard does not have "hexadecimal floating constant". С++ standard has "hexadecimal floating literal". $ g++ t589.cpp -std=c++17 -pedantic -c t589.cpp:25:1: warning: floating constant truncated to zero [-Woverflow] 25 | float f = 0x0.12p-1000f; С++ standard does not have "floating constant". С++ standard has "floating literal".
[Bug preprocessor/104030] [12 Regression] -Wbidi-chars should not warn about UCNs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104030 Richard Biener changed: What|Removed |Added Priority|P3 |P1 Keywords||diagnostic
[Bug target/104004] [12 Regression] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104004 Richard Biener changed: What|Removed |Added Priority|P3 |P1
[Bug c++/103952] [9/10/11/12 Regression] ICE: in cp_finish_decl, at cp/decl.c:7933
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103952 Richard Biener changed: What|Removed |Added Priority|P3 |P4
[Bug c++/104074] [12 Regression] [c++17] Maybe rejected code: is not a valid type for a template non-type parameter since r12-6022-gbb2a7f80a98de3fe
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104074 Patrick Palka changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
[Bug tree-optimization/103899] [12 Regression] make profiledbootstrap fails due to uninitialized warning in expr.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103899 Richard Biener changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #11 from Richard Biener --- The build regression is fixed. If there's interest please file the comment#4 testcase in a separate enhancement bugreport (and yeah, -fprofile-generate added CFG counters can twist costs of optimizations).
[Bug middle-end/24639] [meta-bug] bug to track all Wuninitialized issues
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639 Bug 24639 depends on bug 103899, which changed state. Bug 103899 Summary: [12 Regression] make profiledbootstrap fails due to uninitialized warning in expr.c https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103899 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED
[Bug c++/103852] [10/11/12 Regression] Alias template argument deduction is available in C++17 mode
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103852 Richard Biener changed: What|Removed |Added Priority|P3 |P2
[Bug debug/103788] [9/10/11/12 Regression] '-fcompare-debug' failure (length) w/ -O1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103788 Richard Biener changed: What|Removed |Added Priority|P3 |P2