Bug 82327 - [7 Regression] ICE in equal_mem_array_ref_p, at tree-ssa-scopedtables.c:429 (i686-linux-gnu)
Summary: [7 Regression] ICE in equal_mem_array_ref_p, at tree-ssa-scopedtables.c:429 (...
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 7.2.1
: P1 blocker
Target Milestone: 7.3
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
: 82330 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-09-26 14:00 UTC by Matthias Klose
Modified: 2017-10-26 12:28 UTC (History)
2 users (show)

See Also:
Host:
Target: i686-linux-gnu
Build:
Known to work: 6.4.1, 7.2.0
Known to fail: 7.2.1
Last reconfirmed:


Attachments
preprocessed source (316.69 KB, application/x-xz)
2017-09-26 14:00 UTC, Matthias Klose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Klose 2017-09-26 14:00:29 UTC
Created attachment 42236 [details]
preprocessed source

seen on the gcc-7-branch, introduced within the last two weeks, on i686-linux-gnu, compiler configured to default to PIE.

$ g++ -std=c++11 -c -g -O2 -fPIC -fno-exceptions  InstCombineAddSub.ii 
/home/packages/llvm/llvm-toolchain-3.8-3.8.1/lib/Transforms/InstCombine/InstCombineAddSub.cpp: In function 'llvm::Value* {anonymous}::FAddCombine::simplify(llvm::Instruction*)':
/home/packages/llvm/llvm-toolchain-3.8-3.8.1/lib/Transforms/InstCombine/InstCombineAddSub.cpp:518:8: internal compiler error: in equal_mem_array_ref_p, at tree-ssa-scopedtables.c:429
 Value *FAddCombine::simplify(Instruction *I) {
        ^~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.

creduce doesn't make any progress to reduce the test case.
Comment 1 Andrew Pinski 2017-09-26 19:01:11 UTC
*** Bug 82330 has been marked as a duplicate of this bug. ***
Comment 2 Gianfranco 2017-09-26 19:05:07 UTC
I did add some info on the duplicate bug, I reduced the regression in a bunch of commits (and a two days range).
Comment 3 Jakub Jelinek 2017-09-27 09:40:32 UTC
Can't reproduce, neither with current gcc-7-branch, nor with r253107 (both x86_64-linux with -m32 -march=i686 -mtune=generic -mno-sse), nor Sep 15th build of i686-linux compiler.  Whether the compiler defaults to PIE or not should not matter given the explicit -fPIC.

Can you reproduce it with vanilla gcc-7-branch?
Comment 4 Gianfranco 2017-09-28 11:26:59 UTC
Tested with r253234
https://launchpad.net/ubuntu/+source/gcc-7/7.2.0-7ubuntu4

same issue
Comment 5 Matthias Klose 2017-09-29 12:47:14 UTC
still searching ...

/usr/lib/gcc/i686-linux-gnu/7/include/stddef.h:20440:11: internal compiler error: in equal_mem_array_ref_p, at tree-ssa-scopedtables.c:429
0x8858876 equal_mem_array_ref_p
        ../../src/gcc/tree-ssa-scopedtables.c:429
0x8858876 hashable_expr_equal_p
        ../../src/gcc/tree-ssa-scopedtables.c:466
0x8858876 expr_elt_hasher::equal(expr_hash_elt* const&, expr_hash_elt* const&)
        ../../src/gcc/tree-ssa-scopedtables.c:916
0x885983d hash_table<expr_elt_hasher, xcallocator>::find_slot_with_hash(expr_hash_elt* const&, unsigned int, insert_option)
        ../../src/gcc/hash-table.h:889
0x88591a8 hash_table<expr_elt_hasher, xcallocator>::find_slot(expr_hash_elt* const&, insert_option)
        ../../src/gcc/hash-table.h:414
0x88591a8 avail_exprs_stack::lookup_avail_expr(gimple*, bool, bool)
        ../../src/gcc/tree-ssa-scopedtables.c:156
0x887d01a record_temporary_equivalences_from_stmts_at_dest
        ../../src/gcc/tree-ssa-threadedge.c:336
0x887d6ee thread_through_normal_block
        ../../src/gcc/tree-ssa-threadedge.c:994
0x887f0ac thread_across_edge
        ../../src/gcc/tree-ssa-threadedge.c:1229
0x887f49b thread_outgoing_edges(basic_block_def*, gcond*, const_and_copies*, avail_exprs_stack*, tree_node* (*)(gimple*, gimple*, avail_exprs_stack*, basic_block_def*))
        ../../src/gcc/tree-ssa-threadedge.c:1289
0x87d2cf8 dom_opt_dom_walker::after_dom_children(basic_block_def*)
        ../../src/gcc/tree-ssa-dom.c:1206
0x8ce5d6b dom_walker::walk(basic_block_def*)
        ../../src/gcc/domwalk.c:307
0x87d52d3 execute
        ../../src/gcc/tree-ssa-dom.c:459
Please submit a full bug report,
with preprocessed source if appropriate.

these are distro packages, and apparently only seen with a toolchain defaulting to hardening defaults.
Comment 6 Richard Biener 2017-10-02 08:31:05 UTC
So can you provide -v output then?
Comment 7 Gianfranco 2017-10-12 08:19:00 UTC
Now with gcc using rev 253388 everything is working again.
Comment 8 Matthias Klose 2017-10-26 12:28:40 UTC
closing