public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/105368] New: [10/11/12 Regression] ICE: SIGSEGV in powi_lookup_cost (tree-ssa-math-opts.cc:1441) with -Ofast and __builtin_powf()
@ 2022-04-24 19:07 zsojka at seznam dot cz
  2022-04-25  7:08 ` [Bug tree-optimization/105368] " rguenth at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: zsojka at seznam dot cz @ 2022-04-24 19:07 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105368
           Summary: [10/11/12 Regression] ICE: SIGSEGV in powi_lookup_cost
                    (tree-ssa-math-opts.cc:1441) with -Ofast and
                    __builtin_powf()
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu

Created attachment 52861
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52861&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -Ofast testcase.c -wrapper valgrind,-q
==11132== Invalid read of size 1
==11132==    at 0x15381AE: powi_lookup_cost (tree-ssa-math-opts.cc:1441)
==11132==    by 0x15381AE: powi_cost(long) [clone .part.0]
(tree-ssa-math-opts.cc:1489)
==11132==    by 0x153EA67: powi_cost (tree-ssa-math-opts.cc:1461)
==11132==    by 0x153EA67: gimple_expand_builtin_pow(gimple_stmt_iterator*,
unsigned int, tree_node*, tree_node*) (tree-ssa-math-opts.cc:2048)
==11132==    by 0x153EDE9: (anonymous
namespace)::pass_cse_sincos::execute(function*) (tree-ssa-math-opts.cc:2317)
==11132==    by 0x1298129: execute_one_pass(opt_pass*) (passes.cc:2638)
==11132==    by 0x12989EF: execute_pass_list_1(opt_pass*) (passes.cc:2738)
==11132==    by 0x1298A01: execute_pass_list_1(opt_pass*) (passes.cc:2739)
==11132==    by 0x1298A28: execute_pass_list(function*, opt_pass*)
(passes.cc:2749)
==11132==    by 0xEBD785: expand (cgraphunit.cc:1835)
==11132==    by 0xEBD785: cgraph_node::expand() (cgraphunit.cc:1788)
==11132==    by 0xEBED1F: expand_all_functions (cgraphunit.cc:1999)
==11132==    by 0xEBED1F: symbol_table::compile() [clone .part.0]
(cgraphunit.cc:2349)
==11132==    by 0xEC1957: compile (cgraphunit.cc:2262)
==11132==    by 0xEC1957: symbol_table::finalize_compilation_unit()
(cgraphunit.cc:2530)
==11132==    by 0x13A405F: compile_file() (toplev.cc:479)
==11132==    by 0xD0523D: do_compile (toplev.cc:2168)
==11132==    by 0xD0523D: toplev::main(int, char**) (toplev.cc:2320)
==11132==  Address 0x8000001ffeffec10 is not stack'd, malloc'd or (recently)
free'd
==11132== 
during GIMPLE pass: sincos
testcase.c: In function 'foo':
testcase.c:6:1: internal compiler error: Segmentation fault
    6 | foo (short s, long l)
      | ^~~
0x13a3d9f crash_signal
        /repo/gcc-trunk/gcc/toplev.cc:322
0x15381ae powi_lookup_cost
        /repo/gcc-trunk/gcc/tree-ssa-math-opts.cc:1441
0x15381ae powi_cost
        /repo/gcc-trunk/gcc/tree-ssa-math-opts.cc:1489
0x153ea67 powi_cost
        /repo/gcc-trunk/gcc/tree-ssa-math-opts.cc:1461
0x153ea67 gimple_expand_builtin_pow
        /repo/gcc-trunk/gcc/tree-ssa-math-opts.cc:2048
0x153ede9 execute
        /repo/gcc-trunk/gcc/tree-ssa-math-opts.cc:2317
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.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-8236-20220424133922-g6b7441a46c7-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r12-8236-20220424133922-g6b7441a46c7-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.1 20220424 (experimental) (GCC)

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

end of thread, other threads:[~2022-05-27 13:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-24 19:07 [Bug tree-optimization/105368] New: [10/11/12 Regression] ICE: SIGSEGV in powi_lookup_cost (tree-ssa-math-opts.cc:1441) with -Ofast and __builtin_powf() zsojka at seznam dot cz
2022-04-25  7:08 ` [Bug tree-optimization/105368] " rguenth at gcc dot gnu.org
2022-04-25  8:06 ` zsojka at seznam dot cz
2022-04-25  8:46 ` zsojka at seznam dot cz
2022-04-25  8:54 ` rguenth at gcc dot gnu.org
2022-04-25  8:55 ` pinskia at gcc dot gnu.org
2022-04-25  9:47 ` cvs-commit at gcc dot gnu.org
2022-04-25 10:00 ` zsojka at seznam dot cz
2022-04-25 10:31 ` [Bug tree-optimization/105368] [10/11 " rguenth at gcc dot gnu.org
2022-04-25 10:32 ` rguenth at gcc dot gnu.org
2022-05-19 14:03 ` cvs-commit at gcc dot gnu.org
2022-05-27 13:15 ` [Bug tree-optimization/105368] [10 " cvs-commit at gcc dot gnu.org
2022-05-27 13:17 ` rguenth at gcc dot gnu.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).