public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [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
@ 2022-01-04 22:30 slyfox at gcc dot gnu.org
  2022-01-04 22:35 ` [Bug target/103910] " pinskia at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: slyfox at gcc dot gnu.org @ 2022-01-04 22:30 UTC (permalink / raw)
  To: gcc-bugs

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)

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-02-07  2:27 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-04 22:30 [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 slyfox at gcc dot gnu.org
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

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).