[Bug c++/104031] [12 regression] Global nested constructors generate invalid code since r12-6329-g4f6bc28fc7dd86bd

2022-01-17 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104031 --- Comment #13 from Sergei Trofimovich --- The change also fixed original nix-2.4 test failure. Thank you!

[Bug c++/104031] [12 regression] Global nested constructors generate invalid code since r12-6329-g4f6bc28fc7dd86bd

2022-01-17 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104031 Jakub Jelinek changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug c++/104031] [12 regression] Global nested constructors generate invalid code since r12-6329-g4f6bc28fc7dd86bd

2022-01-17 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104031 --- Comment #11 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:aeca44768d54b089243004d1ef00d34dfa9f6530 commit r12-6643-gaeca44768d54b089243004d1ef00d34dfa9f6530 Author: Jakub Jelinek Date:

[Bug c++/104031] [12 regression] Global nested constructors generate invalid code since r12-6329-g4f6bc28fc7dd86bd

2022-01-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104031 --- Comment #10 from Andrew Pinski --- (In reply to Jakub Jelinek from comment #8) > That last testcase isn't very good for the testsuite, because 0 is pretty > common value on the stack, so even without the store the chances that it > will be

[Bug c++/104031] [12 regression] Global nested constructors generate invalid code since r12-6329-g4f6bc28fc7dd86bd

2022-01-16 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104031 --- Comment #9 from Jakub Jelinek --- Created attachment 52208 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52208=edit gcc12-pr104031.patch This seems to work for the testcase, but dunno if there aren't better fixes.

[Bug c++/104031] [12 regression] Global nested constructors generate invalid code since r12-6329-g4f6bc28fc7dd86bd

2022-01-16 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104031 --- Comment #8 from Jakub Jelinek --- That last testcase isn't very good for the testsuite, because 0 is pretty common value on the stack, so even without the store the chances that it will be already zero are high. 42 is less likely... // PR

[Bug c++/104031] [12 regression] Global nested constructors generate invalid code since r12-6329-g4f6bc28fc7dd86bd

2022-01-15 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104031 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment

[Bug c++/104031] [12 regression] Global nested constructors generate invalid code since r12-6329-g4f6bc28fc7dd86bd

2022-01-14 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104031 --- Comment #6 from Sergei Trofimovich --- > void __static_initialization_and_destruction_0 (int __initialize_p, int > __priority) > { > struct InfoD.2399 D.2453 = {.arityD.2402=0}; Having poked at -fdump-tree-all-raw I now think `=

[Bug c++/104031] [12 regression] Global nested constructors generate invalid code since r12-6329-g4f6bc28fc7dd86bd

2022-01-14 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104031 --- Comment #5 from Sergei Trofimovich --- gcc-11 for comparison did not seem to have `struct InfoD.2399 D.2453 = {.arityD.2402=0};` style nodes and encoded stores explicitly: main.cc.244t.optimized: voidD.48 _GLOBAL__sub_I_main () { struct

[Bug c++/104031] [12 regression] Global nested constructors generate invalid code since r12-6329-g4f6bc28fc7dd86bd

2022-01-14 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104031 --- Comment #4 from Sergei Trofimovich --- Great test, Andrew! Something is completely dropped initialization of Info{} input argument to s_op. As if it's lifetime ends before RegisterPrimOp{} enters: --- main.s.good 2022-01-14

[Bug c++/104031] [12 regression] Global nested constructors generate invalid code since r12-6329-g4f6bc28fc7dd86bd

2022-01-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104031 --- Comment #3 from Andrew Pinski --- Reduced testcase without any headers: struct vector { vector(){} ~vector(){} }; struct Info { vector args; int arity = 0; }; struct RegisterPrimOp { [[gnu::noipa, gnu::noinline]]

[Bug c++/104031] [12 regression] Global nested constructors generate invalid code since r12-6329-g4f6bc28fc7dd86bd

2022-01-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104031 --- Comment #2 from Andrew Pinski --- I can remove std::string but not figure out how to remove std::vector yet: #include #include struct string { string(int){} }; struct allocator { allocator(){} }; struct vector { vector(allocator

[Bug c++/104031] [12 regression] Global nested constructors generate invalid code since r12-6329-g4f6bc28fc7dd86bd

2022-01-14 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104031 Martin Liška changed: What|Removed |Added Last reconfirmed||2022-01-14 Ever confirmed|0