public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "slyfox at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103910] New: openjdk17 causes ICE on -O3 -march=opteron -fchecking-new: during GIMPLE pass: aprefetch: in gimple_build_call, at gimple.c:267 Date: Tue, 04 Jan 2022 22:30:56 +0000 [thread overview] Message-ID: <bug-103910-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103910 Bug ID: 103910 Summary: openjdk17 causes ICE on -O3 -march=opteron -fchecking-new: during GIMPLE pass: aprefetch: in gimple_build_call, at gimple.c:267 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- Target: x86_64-pc-linux-gnu ICE initially noticed by Alexander Weber in https://bugs.gentoo.org/822690. Here is the reduced test, fails on both gcc-12 and gcc-11.2.0. Note: it needs a gch header. //$ cat archiveBuilder.cpp #include "precompiled.hpp" void *operator new(unsigned long, void *__p) { return __p; } #define MEMORY_TYPES_DO(f) f(mtNone, ) enum MEMFLAGS {}; #define MEMORY_TYPE_SHORTNAME(type, human_readable) MEMFLAGS type; MEMORY_TYPES_DO(MEMORY_TYPE_SHORTNAME) struct GrowableArrayView { GrowableArrayView(int *, int, int); }; int *GrowableArrayWithAllocator_data; struct GrowableArrayWithAllocator : GrowableArrayView { GrowableArrayWithAllocator(int initial_max) : GrowableArrayView(GrowableArrayWithAllocator_data, initial_max, 0) { for (int i = 0; i < initial_max; i++) new (&GrowableArrayWithAllocator_data[i]) int(); } }; struct GrowableArrayMetadata { GrowableArrayMetadata(MEMFLAGS); }; struct GrowableArray : GrowableArrayWithAllocator { GrowableArrayMetadata _metadata; GrowableArray(int initial_max) : GrowableArrayWithAllocator(initial_max), _metadata(mtNone) {} }; struct SourceObjList { SourceObjList(); }; SourceObjList::SourceObjList() { GrowableArray(128 * 1024); } $ rm -rf ph $ mkdir -p ph $ touch precompiled_.hpp # create empty file $ ./xg++ -B. -O3 -march=opteron -fcheck-new -c precompiled_.hpp -o ph/precompiled.hpp.gch $ ./xg++ -B. -O3 -march=opteron -fcheck-new -Iph -c archiveBuilder.cpp -o a.o during GIMPLE pass: aprefetch archiveBuilder.cpp: In constructor ‘SourceObjList::SourceObjList()’: archiveBuilder.cpp:28:1: internal compiler error: in gimple_build_call, at gimple.c:267 28 | SourceObjList::SourceObjList() { GrowableArray(128 * 1024); } | ^~~~~~~~~~~~~ 0xd2845f gimple_build_call(tree_node*, unsigned int, ...) gcc/gimple.c:267 0x12880c8 emit_mfence_after_loop gcc/tree-ssa-loop-prefetch.c:1300 0x12880c8 mark_nontemporal_stores gcc/tree-ssa-loop-prefetch.c:1359 0x12880c8 loop_prefetch_arrays gcc/tree-ssa-loop-prefetch.c:1955 0x12880c8 tree_ssa_prefetch_arrays() gcc/tree-ssa-loop-prefetch.c:2031 0x1288be9 execute gcc/tree-ssa-loop-prefetch.c:2097 $ ./xg++ -v Using built-in specs. COLLECT_GCC=./xg++ Target: x86_64-pc-linux-gnu Configured with: ../configure --disable-multilib --disable-bootstrap --with-native-system-header-dir=<<NIX>>-glibc-2.33-59-dev/include --prefix=/home/slyfox/dev/git/gcc-build/__td__ CFLAGS='-O1 -ggdb3' CXXFLAGS='-O1 -ggdb3' LDFLAGS='-O1 -ggdb3' Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.0 20220104 (experimental) (GCC)
next reply other threads:[~2022-01-04 22:30 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-04 22:30 slyfox at gcc dot gnu.org [this message] 2022-01-04 22:35 ` [Bug target/103910] " pinskia at gcc dot gnu.org 2022-01-04 22:35 ` slyfox at gcc dot gnu.org 2022-01-04 22:37 ` pinskia at gcc dot gnu.org 2022-01-05 8:37 ` slyfox at gcc dot gnu.org 2022-01-05 21:11 ` [Bug target/103910] openjdk17 causes ICE on -O3 -march=opteron -fcheck-new: " pinskia at gcc dot gnu.org 2022-01-05 22:38 ` cvs-commit at gcc dot gnu.org 2022-01-05 22:41 ` pinskia at gcc dot gnu.org 2022-01-07 15:34 ` sam at gentoo dot org 2022-01-07 15:35 ` sam at gentoo dot org 2022-01-07 22:45 ` pinskia at gcc dot gnu.org 2022-01-08 0:20 ` sam at gentoo dot org 2022-02-01 22:18 ` egallager at gcc dot gnu.org 2024-02-07 2:27 ` alx at kernel dot 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-103910-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).