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

            Bug ID: 78644
           Summary: [7 Regression] ICE: SIGSEGV in is_gimple_reg_type with
                    -Og -fipa-cp
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Keywords: ice-checking, ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu
             Build: x86_64-pc-linux-gnu

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

Compiler output:
$ x86_64-pc-linux-gnu-gcc -Og -fipa-cp testcase.c -Wno-psabi -wrapper
valgrind,-q
==13237== Invalid read of size 2
==13237==    at 0x99A789: is_gimple_reg_type (gimple-expr.h:75)
==13237==    by 0x99A789: is_gimple_val(tree_node*) (gimple-expr.c:781)
==13237==    by 0xCE310B: verify_gimple_assign_binary (tree-cfg.c:3797)
==13237==    by 0xCE310B: verify_gimple_assign (tree-cfg.c:4477)
==13237==    by 0xCE310B: verify_gimple_stmt(gimple*) (tree-cfg.c:4731)
==13237==    by 0xCF56E4: verify_gimple_in_cfg(function*, bool)
(tree-cfg.c:5192)
==13237==    by 0xB95092: execute_function_todo(function*, void*)
(passes.c:1965)
==13237==    by 0xB95A49: execute_todo(unsigned int) (passes.c:2015)
==13237==    by 0xB9853D: execute_one_pass(opt_pass*) (passes.c:2410)
==13237==    by 0xB98917: execute_pass_list_1(opt_pass*) (passes.c:2459)
==13237==    by 0xB98929: execute_pass_list_1(opt_pass*) (passes.c:2460)
==13237==    by 0xB98974: execute_pass_list(function*, opt_pass*)
(passes.c:2470)
==13237==    by 0x81AE63: cgraph_node::expand() (cgraphunit.c:2001)
==13237==    by 0x81C747: expand_all_functions (cgraphunit.c:2137)
==13237==    by 0x81C747: symbol_table::compile() (cgraphunit.c:2494)
==13237==    by 0x81E995: symbol_table::finalize_compilation_unit()
(cgraphunit.c:2584)
==13237==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==13237== 
testcase.c: In function 'bar.constprop':
testcase.c:7:1: internal compiler error: Segmentation fault
 bar (u128 x2, u128 x3)
 ^~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> 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-243165-checking-yes-rtl-df-extra-nobootstrap-nographite-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.0.0/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 --without-cloog --without-ppl --without-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-243165-checking-yes-rtl-df-extra-nobootstrap-nographite-amd64
Thread model: posix
gcc version 7.0.0 20161202 (experimental) (GCC) 

Some checking is probably needed in order to have verify_gimple_in_cfg()
called.

Reply via email to