public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/46095] New: [4.6 Regression] ICE: in dwarf2out_frame_debug_expr, at dwarf2out.c:2341 with -fstack-protector
@ 2010-10-20 13:19 zsojka at seznam dot cz
  2010-10-20 19:09 ` [Bug debug/46095] " hjl.tools at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2010-10-20 13:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46095

           Summary: [4.6 Regression] ICE: in dwarf2out_frame_debug_expr,
                    at dwarf2out.c:2341 with -fstack-protector
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz


Created attachment 22092
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22092
reduced testcase

Compiler output:
$ gcc -O -fschedule-insns2 -fno-omit-frame-pointer -fstack-protector pr46095.c
pr46095.c: In function 'foo':
pr46095.c:8:1: internal compiler error: in dwarf2out_frame_debug_expr, at
dwarf2out.c:2341
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested revisions:
r165719 - crash
r163636 - OK


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug debug/46095] [4.6 Regression] ICE: in dwarf2out_frame_debug_expr, at dwarf2out.c:2341 with -fstack-protector
  2010-10-20 13:19 [Bug debug/46095] New: [4.6 Regression] ICE: in dwarf2out_frame_debug_expr, at dwarf2out.c:2341 with -fstack-protector zsojka at seznam dot cz
@ 2010-10-20 19:09 ` hjl.tools at gmail dot com
  2010-10-26  1:01 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2010-10-20 19:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46095

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2010.10.20 19:09:13
                 CC|                            |hjl.tools at gmail dot com,
                   |                            |rth at gcc dot gnu.org
   Target Milestone|---                         |4.6.0
     Ever Confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2010-10-20 19:09:13 UTC ---
It is caused by revision 164628:

http://gcc.gnu.org/ml/gcc-cvs/2010-09/msg00926.html


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug debug/46095] [4.6 Regression] ICE: in dwarf2out_frame_debug_expr, at dwarf2out.c:2341 with -fstack-protector
  2010-10-20 13:19 [Bug debug/46095] New: [4.6 Regression] ICE: in dwarf2out_frame_debug_expr, at dwarf2out.c:2341 with -fstack-protector zsojka at seznam dot cz
  2010-10-20 19:09 ` [Bug debug/46095] " hjl.tools at gmail dot com
@ 2010-10-26  1:01 ` jakub at gcc dot gnu.org
  2010-11-15 17:43 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-10-26  1:01 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46095

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
                 CC|                            |jakub at gcc dot gnu.org


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug debug/46095] [4.6 Regression] ICE: in dwarf2out_frame_debug_expr, at dwarf2out.c:2341 with -fstack-protector
  2010-10-20 13:19 [Bug debug/46095] New: [4.6 Regression] ICE: in dwarf2out_frame_debug_expr, at dwarf2out.c:2341 with -fstack-protector zsojka at seznam dot cz
  2010-10-20 19:09 ` [Bug debug/46095] " hjl.tools at gmail dot com
  2010-10-26  1:01 ` jakub at gcc dot gnu.org
@ 2010-11-15 17:43 ` jakub at gcc dot gnu.org
  2010-11-15 19:50 ` rth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-15 17:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46095

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-15 17:28:45 UTC ---
Created attachment 22402
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22402
gcc46-pr46095.patch

Untested fix.

The problem why the current code doesn't work is that scheduling swaps
the movq %rsp, %rbp and movabsq $......, %r11 insns.  When they are swapped,
it doesn't help that the %r11 setting insn is marked as frame related, it sets
cfa_temp, but the next insn (movq %rsp, %rbp) clobbers cfa_temp and thus when
on the following addq %r11, %rsp insn we'd like to be able to look up the
offset
loaded into r11, cfa_temp no longer describes it and thus we ICE.

Before Richard's patch the insn was using a const_int in the addition instead
and had additional USE on r11 register.  I'd say the easiest fix is just to
describe what the insn actually does in REG_FRAME_RELATED_EXPR, as done in this
patch.  Then what value is loaded into r11 is uninteresting.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug debug/46095] [4.6 Regression] ICE: in dwarf2out_frame_debug_expr, at dwarf2out.c:2341 with -fstack-protector
  2010-10-20 13:19 [Bug debug/46095] New: [4.6 Regression] ICE: in dwarf2out_frame_debug_expr, at dwarf2out.c:2341 with -fstack-protector zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2010-11-15 17:43 ` jakub at gcc dot gnu.org
@ 2010-11-15 19:50 ` rth at gcc dot gnu.org
  2010-11-15 20:34 ` jakub at gcc dot gnu.org
  2010-11-15 20:46 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rth at gcc dot gnu.org @ 2010-11-15 19:50 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46095

--- Comment #3 from Richard Henderson <rth at gcc dot gnu.org> 2010-11-15 19:30:09 UTC ---
The patch looks good.  Ok after testing.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug debug/46095] [4.6 Regression] ICE: in dwarf2out_frame_debug_expr, at dwarf2out.c:2341 with -fstack-protector
  2010-10-20 13:19 [Bug debug/46095] New: [4.6 Regression] ICE: in dwarf2out_frame_debug_expr, at dwarf2out.c:2341 with -fstack-protector zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2010-11-15 19:50 ` rth at gcc dot gnu.org
@ 2010-11-15 20:34 ` jakub at gcc dot gnu.org
  2010-11-15 20:46 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-15 20:34 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46095

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-15 20:09:34 UTC ---
Author: jakub
Date: Mon Nov 15 20:09:24 2010
New Revision: 166767

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166767
Log:
    PR debug/46095
    * config/i386/i386.c (pro_epilogue_adjust_stack): Instead of
    marking r11 set RTX_FRAME_RELATED_P if offset is too large for
    style < 0, add REG_FRAME_RELATED_EXPR.

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

Added:
    trunk/gcc/testsuite/gcc.target/i386/pr46095.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug debug/46095] [4.6 Regression] ICE: in dwarf2out_frame_debug_expr, at dwarf2out.c:2341 with -fstack-protector
  2010-10-20 13:19 [Bug debug/46095] New: [4.6 Regression] ICE: in dwarf2out_frame_debug_expr, at dwarf2out.c:2341 with -fstack-protector zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2010-11-15 20:34 ` jakub at gcc dot gnu.org
@ 2010-11-15 20:46 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-15 20:46 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46095

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-15 20:35:04 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-11-15 20:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-20 13:19 [Bug debug/46095] New: [4.6 Regression] ICE: in dwarf2out_frame_debug_expr, at dwarf2out.c:2341 with -fstack-protector zsojka at seznam dot cz
2010-10-20 19:09 ` [Bug debug/46095] " hjl.tools at gmail dot com
2010-10-26  1:01 ` jakub at gcc dot gnu.org
2010-11-15 17:43 ` jakub at gcc dot gnu.org
2010-11-15 19:50 ` rth at gcc dot gnu.org
2010-11-15 20:34 ` jakub at gcc dot gnu.org
2010-11-15 20:46 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).