Bug 84638 - [8 Regression] -fsanitize=address internal compiler error: verify_gimple failed (error: invalid rhs for gimple memory store)
Summary: [8 Regression] -fsanitize=address internal compiler error: verify_gimple fail...
Status: RESOLVED DUPLICATE of bug 82484
Alias: None
Product: gcc
Classification: Unclassified
Component: sanitizer (show other bugs)
Version: 8.0.1
: P1 normal
Target Milestone: ---
Assignee: Martin Liška
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks: ubsan
  Show dependency treegraph
 
Reported: 2018-03-01 08:00 UTC by Vegard Nossum
Modified: 2018-03-01 08:45 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work: 7.3.0
Known to fail: 8.0
Last reconfirmed: 2018-03-01 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vegard Nossum 2018-03-01 08:00:48 UTC
Input:

a(volatile int b) { &b; }

Output:

$ xgcc -x c++ -S -fpermissive -fsanitize=address -
<stdin>:1:17: warning: ISO C++ forbids declaration of 'a' with no type [-fpermissive]
<stdin>: In function 'int a(int)':
<stdin>:1:25: warning: no return statement in function returning non-void [-Wreturn-type]
<stdin>:1:1: error: invalid rhs for gimple memory store
b

b

# .MEM_2 = VDEF <.MEM_1(D)>
b ={v} b;
during GIMPLE pass: sanopt
<stdin>:1:1: internal compiler error: verify_gimple failed
0x32e110f verify_gimple_in_cfg(function*, bool)
        /home/vegard/git/gcc/gcc/tree-cfg.c:5579
0x2b65957 execute_function_todo
        /home/vegard/git/gcc/gcc/passes.c:1994
0x2b6e626 do_per_function
        /home/vegard/git/gcc/gcc/passes.c:1659
0x2b6e626 execute_todo
        /home/vegard/git/gcc/gcc/passes.c:2048

$ xgcc --version
xgcc (GCC) 8.0.1 20180228 (experimental)

Built from git fd1990b25777e5f1307eac1447e8fb5fefe747b4 (r258063).

7.3.0 looks fine to me.

Test case was reduced by C-Reduce.
Comment 1 Martin Liška 2018-03-01 08:06:06 UTC
Confirmed.
Comment 2 Martin Liška 2018-03-01 08:13:07 UTC
Started with my revision r249903.
Comment 3 Martin Liška 2018-03-01 08:45:02 UTC
Dup.

*** This bug has been marked as a duplicate of bug 82484 ***