Bug 64513 - [4.8/4.9 Regression] ICE: in maybe_record_trace_start, at dwarf2cfi.c:2231 with -mstack-arg-probe
Summary: [4.8/4.9 Regression] ICE: in maybe_record_trace_start, at dwarf2cfi.c:2231 wi...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 5.0
: P3 normal
Target Milestone: 4.8.5
Assignee: Jakub Jelinek
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2015-01-06 20:04 UTC by Zdenek Sojka
Modified: 2015-02-01 21:57 UTC (History)
1 user (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build:
Known to work: 4.6.4, 5.0
Known to fail: 4.7.4, 4.8.5, 4.9.3
Last reconfirmed: 2015-01-12 00:00:00


Attachments
reduced testcase (112 bytes, text/x-csrc)
2015-01-06 20:04 UTC, Zdenek Sojka
Details
gcc5-pr64513.patch (614 bytes, patch)
2015-01-12 16:24 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2015-01-06 20:04:51 UTC
Created attachment 34389 [details]
reduced testcase

Compiler output:
$ gcc -O2 -mstack-arg-probe testcase.c         
testcase.c: In function 'bar':
testcase.c:19:1: internal compiler error: in maybe_record_trace_start, at dwarf2cfi.c:2302
 }
 ^
0x879e5c maybe_record_trace_start
        /mnt/svn/gcc-trunk/gcc/dwarf2cfi.c:2302
0x87aa53 scan_trace
        /mnt/svn/gcc-trunk/gcc/dwarf2cfi.c:2480
0x87c20a create_cfi_notes
        /mnt/svn/gcc-trunk/gcc/dwarf2cfi.c:2634
0x87c20a execute_dwarf2_frame
        /mnt/svn/gcc-trunk/gcc/dwarf2cfi.c:2990
0x87c20a execute
        /mnt/svn/gcc-trunk/gcc/dwarf2cfi.c:3470
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.

Tested revisions:
r219255 - ICE
4_9 r219040 - ICE
4_8 r219093 - ICE
4_7 r211571 - ICE
4_6 r197894 - OK
Comment 1 Jakub Jelinek 2015-01-12 15:26:38 UTC
Started with r179553.
Comment 2 Jakub Jelinek 2015-01-12 16:24:37 UTC
Created attachment 34424 [details]
gcc5-pr64513.patch

Untested fix.
Comment 3 Jakub Jelinek 2015-01-12 20:46:10 UTC
Author: jakub
Date: Mon Jan 12 20:45:38 2015
New Revision: 219492

URL: https://gcc.gnu.org/viewcvs?rev=219492&root=gcc&view=rev
Log:
	PR target/64513
	* config/i386/i386.c (ix86_expand_prologue): Add
	REG_FRAME_RELATED_EXPR to %rax and %r10 pushes.

	* gcc.target/i386/pr64513.c: New test.

Added:
    trunk/gcc/testsuite/gcc.target/i386/pr64513.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/testsuite/ChangeLog
Comment 4 Jakub Jelinek 2015-01-12 20:53:11 UTC
Fixed on the trunk so far.
Comment 5 Jakub Jelinek 2015-01-14 22:05:22 UTC
Author: jakub
Date: Wed Jan 14 22:04:49 2015
New Revision: 219618

URL: https://gcc.gnu.org/viewcvs?rev=219618&root=gcc&view=rev
Log:
	Backported from mainline
	2015-01-12  Jakub Jelinek  <jakub@redhat.com>

	PR target/64513
	* config/i386/i386.c (ix86_expand_prologue): Add
	REG_FRAME_RELATED_EXPR to %rax and %r10 pushes.

	* gcc.target/i386/pr64513.c: New test.

Added:
    branches/gcc-4_9-branch/gcc/testsuite/gcc.target/i386/pr64513.c
Modified:
    branches/gcc-4_9-branch/gcc/ChangeLog
    branches/gcc-4_9-branch/gcc/config/i386/i386.c
    branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
Comment 6 Jakub Jelinek 2015-02-01 21:50:19 UTC
Author: jakub
Date: Sun Feb  1 21:49:47 2015
New Revision: 220331

URL: https://gcc.gnu.org/viewcvs?rev=220331&root=gcc&view=rev
Log:
	Backported from mainline
	2015-01-12  Jakub Jelinek  <jakub@redhat.com>

	PR target/64513
	* config/i386/i386.c (ix86_expand_prologue): Add
	REG_FRAME_RELATED_EXPR to %rax and %r10 pushes.

	* gcc.target/i386/pr64513.c: New test.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr64513.c
Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/config/i386/i386.c
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
Comment 7 Jakub Jelinek 2015-02-01 21:57:42 UTC
Fixed.