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

            Bug ID: 63721
           Summary: [5 Regression] IPA ICF cause
                    atomic-comp-swap-release-acquire.c ICE on arm
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jiwang at gcc dot gnu.org

Created attachment 33875
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33875&action=edit
bug.i

start from revision 216305, and still exist on latest code 217035.

commit 52200d03c231f0bddbd4bbc5cd3608c6a1dd4598
Author: marxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Thu Oct 16 10:47:55 2014 +0000

    IPA ICF pass, part 3/5

    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216305
138bc75d-0d04-0410-961f-82ee72b054a4


cross configuration
===

    ../gcc/configure --target=arm-unknown-linux-gnueabihf --with-float=hard
--with-arch=armv7-a --with-tune=cortex-a15 --disable-multilib
--enable-languages=c,c++,fortran,java,lto,objc

compile command
===

  ./cc1 -O2 -fPIC bug.i -nostdinc
  (if specify -fno-ipa-icf then the ICE will go away)

backtrace
===

atomic-comp-swap-release-acquire.c: In function
‘atomic_compare_exchange_WEAK_RELEASE_ACQUIRE’:
atomic-comp-swap-release-acquire.c:7:0: error: invalid argument to gimple call

 ^
a
# .MEM_3 = VDEF <.MEM_1(D)>
retval.10_4 = atomic_compare_exchange_n_WEAK_RELEASE_ACQUIRE.localalias.0 (a,
b_2(D)); [tail call]

Breakpoint 2, internal_error (gmsgid=0x14ff2a8 "verify_gimple failed") at
../../gcc/gcc/diagnostic.c:1176
1176      va_start (ap, gmsgid);
(gdb) bt
#0  internal_error (gmsgid=0x14ff2a8 "verify_gimple failed") at
../../gcc/gcc/diagnostic.c:1176
#1  0x0000000000c8bc5d in verify_gimple_in_cfg (fn=0x7ffff6b097e0,
verify_nothrow=false) at ../../gcc/gcc/tree-cfg.c:5039
#2  0x0000000000b52b81 in execute_function_todo (fn=0x7ffff6b097e0, data=0x40)
at ../../gcc/gcc/passes.c:1758
#3  0x0000000000b51f12 in do_per_function (callback=0xb529db
<execute_function_todo(function*, void*)>, data=0x40) at
../../gcc/gcc/passes.c:1492
#4  0x0000000000b52d69 in execute_todo (flags=64) at
../../gcc/gcc/passes.c:1815
#5  0x0000000000b538cb in execute_one_pass (pass=0x1d0b0e0) at
../../gcc/gcc/passes.c:2172
#6  0x0000000000b5464e in execute_ipa_pass_list (pass=0x1d0b0e0) at
../../gcc/gcc/passes.c:2553
#7  0x00000000007db73f in ipa_passes () at ../../gcc/gcc/cgraphunit.c:2065
#8  0x00000000007db9e0 in symbol_table::compile (this=0x7ffff6c74000) at
../../gcc/gcc/cgraphunit.c:2145
#9  0x00000000007dbe52 in symbol_table::finalize_compilation_unit
(this=0x7ffff6c74000) at ../../gcc/gcc/cgraphunit.c:2298
#10 0x0000000000635abb in c_write_global_declarations () at
../../gcc/gcc/c/c-decl.c:10779
#11 0x0000000000c4ce74 in compile_file () at ../../gcc/gcc/toplev.c:582
#12 0x0000000000c4f19a in do_compile () at ../../gcc/gcc/toplev.c:1989
#13 0x0000000000c4f3a4 in toplev::main (this=0x7fffffffe49f, argc=5,
argv=0x7fffffffe598) at ../../gcc/gcc/toplev.c:2086
#14 0x00000000013a489a in main (argc=5, argv=0x7fffffffe598) at
../../gcc/gcc/main.c:38
(gdb)

Reply via email to