Bug 59507 - ICE: in mark_reachable_handlers, at tree-eh.c:3833 with -O -fnon-call-exceptions -fvtable-verify=preinit
Summary: ICE: in mark_reachable_handlers, at tree-eh.c:3833 with -O -fnon-call-excepti...
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.9.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
: 98101 101689 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-12-14 13:17 UTC by Zdenek Sojka
Modified: 2024-03-26 08:07 UTC (History)
6 users (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build:
Known to work:
Known to fail: 4.9.0, 5.4.0, 6.4.0, 7.2.0
Last reconfirmed: 2024-03-26 00:00:00


Attachments
reduced testcase (297 bytes, text/x-csrc)
2013-12-14 13:17 UTC, Zdenek Sojka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2013-12-14 13:17:42 UTC
Created attachment 31439 [details]
reduced testcase

Compiler output:
$ gcc -O -fnon-call-exceptions -fvtable-verify=preinit testcase.C
testcase.C: In function 'void print()':
testcase.C:44:6: internal compiler error: in mark_reachable_handlers, at tree-eh.c:3833
 void print ()
      ^
0xd1ca11 mark_reachable_handlers
        /mnt/svn/gcc-trunk/gcc/tree-eh.c:3833
0xd1cb52 remove_unreachable_handlers
        /mnt/svn/gcc-trunk/gcc/tree-eh.c:3866
0xd1e5f5 execute_cleanup_eh_1
        /mnt/svn/gcc-trunk/gcc/tree-eh.c:4536
0xd1e5f5 execute_cleanup_eh
        /mnt/svn/gcc-trunk/gcc/tree-eh.c:4569
0xd1e5f5 execute
        /mnt/svn/gcc-trunk/gcc/tree-eh.c:4614
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


$ gcc -v
Using built-in specs.
COLLECT_GCC=/mnt/svn/gcc-trunk/binary-latest/bin/gcc
COLLECT_LTO_WRAPPER=/mnt/svn/gcc-trunk/binary-205916-lto-fortran-checking-yes-rtl-df/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /mnt/svn/gcc-trunk//configure --enable-checking=yes,rtl,df --enable-languages=c,c++,lto,fortran --prefix=/mnt/svn/gcc-trunk/binary-205916-lto-fortran-checking-yes-rtl-df/ --without-cloog --without-ppl
Thread model: posix
gcc version 4.9.0 20131212 (experimental) (GCC)
Comment 1 Marek Polacek 2013-12-14 13:23:19 UTC
Confirmed.
Comment 2 Jakub Jelinek 2014-04-22 11:36:56 UTC
GCC 4.9.0 has been released
Comment 3 ctice 2014-04-22 21:17:10 UTC
This is caused by the verification call being inserted after an exception handler landing pad, in the same basic block as the landing pad, when GCC expects the landing pad statement to be the last statement in the basic block.

The fix for this will be to split all the outgoing edges and insert new basic blocks on each, with the verification call in there instead.  I will work on this, but it may take me a little time to get right.
Comment 4 Jakub Jelinek 2014-07-16 13:30:19 UTC
GCC 4.9.1 has been released.
Comment 5 Jakub Jelinek 2014-10-30 10:40:23 UTC
GCC 4.9.2 has been released.
Comment 6 Jakub Jelinek 2015-06-26 19:53:10 UTC
GCC 4.9.3 has been released.
Comment 7 Andrew Pinski 2021-08-08 16:29:08 UTC
*** Bug 101689 has been marked as a duplicate of this bug. ***
Comment 8 Andrew Pinski 2021-08-08 16:31:00 UTC
*** Bug 98101 has been marked as a duplicate of this bug. ***