Bug 79777 - [7 Regression] ICE on -Os and above in on aarch64-linux-gnu (internal compiler error: in VN_INFO_GET, at tree-ssa-sccvn.c:407 })
Summary: [7 Regression] ICE on -Os and above in on aarch64-linux-gnu (internal compile...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 7.0.1
: P1 normal
Target Milestone: 7.0
Assignee: Richard Biener
URL:
Keywords: ice-on-valid-code
Depends on: 79740
Blocks: 45397
  Show dependency treegraph
 
Reported: 2017-03-01 12:42 UTC by Arnd Bergmann
Modified: 2017-03-02 08:46 UTC (History)
0 users

See Also:
Host:
Target: aarch64-linux
Build:
Known to work:
Known to fail: 7.0.1
Last reconfirmed: 2017-03-01 00:00:00


Attachments
preprocessed linux/fs/hpfs/anode.c, compressed, not reduced (206.39 KB, application/gzip)
2017-03-01 12:42 UTC, Arnd Bergmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arnd Bergmann 2017-03-01 12:42:09 UTC
Created attachment 40860 [details]
preprocessed linux/fs/hpfs/anode.c, compressed, not reduced

I ran into a regression building the kernel with the latest gcc yesterday:

/git/arm-soc/fs/hpfs/anode.c: In function 'hpfs_truncate_btree':
/git/arm-soc/fs/hpfs/anode.c:399:6: internal compiler error: in VN_INFO_GET, at tree-ssa-sccvn.c:407
 void hpfs_truncate_btree(struct super_block *s, secno f, int fno, unsigned secs)
      ^~~~~~~~~~~~~~~~~~~
0xb47fe6 VN_INFO_GET(tree_node*)
	/home/arnd/git/gcc/gcc/tree-ssa-sccvn.c:406
0xb27fd3 eliminate_insert
	/home/arnd/git/gcc/gcc/tree-ssa-pre.c:4137
0xb27fd3 eliminate_dom_walker::before_dom_children(basic_block_def*)
	/home/arnd/git/gcc/gcc/tree-ssa-pre.c:4271
0xe72f62 dom_walker::walk(basic_block_def*)
	/home/arnd/git/gcc/gcc/domwalk.c:265
0xb26c5f eliminate
	/home/arnd/git/gcc/gcc/tree-ssa-pre.c:4732
0xb26fbf execute
	/home/arnd/git/gcc/gcc/tree-ssa-pre.c:5166

This seems very similar to pr79740, but is not fixed by r245780, which was done to address that one. I build this with "aarch64-linux-gcc-7.0.1 -c anode.i -Os   -Wall -fno-strict-aliasing -Wno-pointer-sign".
Comment 1 Richard Biener 2017-03-01 12:54:39 UTC
Confirmed, mine.
Comment 2 Richard Biener 2017-03-02 07:54:14 UTC
Author: rguenth
Date: Thu Mar  2 07:53:42 2017
New Revision: 245830

URL: https://gcc.gnu.org/viewcvs?rev=245830&root=gcc&view=rev
Log:
2017-03-02  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/79777
	* tree-ssa-pre.c (eliminate_insert): Give up if we simplify
	the to insert expression to sth existing.

	* gcc.dg/torture/pr79777.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr79777.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-pre.c
Comment 3 Arnd Bergmann 2017-03-02 08:44:30 UTC
Fix confirmed with all configurations that previously showed the problem. Thanks a lot!
Comment 4 Richard Biener 2017-03-02 08:46:17 UTC
Fixed.