https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115595

            Bug ID: 115595
           Summary: ICE: in expand_call_tm, at trans-mem.cc:2546 with
                    attribute optimize and noipa
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iamanonymous.cs at gmail dot com
  Target Milestone: ---

ICE on trunk.
Compiler Explorer: https://godbolt.org/z/bevrv3Gcs

*******************************************************************************
OS and Platform:
$ uname -a:
Linux ubuntu 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023
x86_64 x86_64 x86_64 GNU/Linux
*******************************************************************************
gcc version:
Using built-in specs.
COLLECT_GCC=/root/gcc_set/trunk-48a320a/bin/gcc
COLLECT_LTO_WRAPPER=/root/gcc_set/trunk-48a320a/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/root/gcc_set/trunk-48a320a
--with-gmp=/root/build_essential --with-mpfr=/root/build_essential
--with-mpc=/root/build_essential --enable-languages=c,c++ --disable-multilib
--with-sanitizer=address,undefined,thread,leak --enable-coverage
--disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240426 (experimental) (GCC) 

*******************************************************************************
Program:
$ cat mutant.c
int a;
__attribute__((optimize(1), noipa)) void b() {
  __transaction_atomic {
    if (a)
      __transaction_cancel;
  }
}

*******************************************************************************
Command Lines:
$ gcc -fsanitize=thread -fgnu-tm mutant.c
during GIMPLE pass: tmmark
mutant.c: In function ‘b’:
mutant.c:2:42: internal compiler error: in expand_call_tm, at trans-mem.cc:2546
    2 | __attribute__((optimize(1), noipa)) void b() {
      |                                          ^
0x1e577fa expand_call_tm
        ../../gcc/gcc/trans-mem.cc:2546
0x1e57fb1 expand_block_tm
        ../../gcc/gcc/trans-mem.cc:2651
0x1e5a18c execute_tm_mark
        ../../gcc/gcc/trans-mem.cc:3129
0x1e5a344 execute
        ../../gcc/gcc/trans-mem.cc:3176
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to