public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/51377] New: ICE when generating debug info for targets with multiple pointer sizes
@ 2011-12-01 10:36 nickc at redhat dot com
  2011-12-01 10:45 ` [Bug debug/51377] " nickc at redhat dot com
  2011-12-01 10:54 ` nickc at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: nickc at redhat dot com @ 2011-12-01 10:36 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51377
           Summary: ICE when generating debug info for targets with
                    multiple pointer sizes
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: nickc@redhat.com


Created attachment 25966
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25966
Source for test case

This is a follow up to a problem first reported here:

http://gcc.gnu.org/ml/gcc/2011-11/msg00397.html


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

* [Bug debug/51377] ICE when generating debug info for targets with multiple pointer sizes
  2011-12-01 10:36 [Bug debug/51377] New: ICE when generating debug info for targets with multiple pointer sizes nickc at redhat dot com
@ 2011-12-01 10:45 ` nickc at redhat dot com
  2011-12-01 10:54 ` nickc at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: nickc at redhat dot com @ 2011-12-01 10:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Nick Clifton <nickc at redhat dot com> 2011-12-01 10:44:57 UTC ---
Created attachment 25967
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25967
Test for mixed pointer modes in the assertion.


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

* [Bug debug/51377] ICE when generating debug info for targets with multiple pointer sizes
  2011-12-01 10:36 [Bug debug/51377] New: ICE when generating debug info for targets with multiple pointer sizes nickc at redhat dot com
  2011-12-01 10:45 ` [Bug debug/51377] " nickc at redhat dot com
@ 2011-12-01 10:54 ` nickc at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: nickc at redhat dot com @ 2011-12-01 10:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Nick Clifton <nickc at redhat dot com> 2011-12-01 10:54:35 UTC ---
[Darn - hit return too early].

When compiling for a target that supports multiple pointer sizes (eg s390)
generating debug information can trigger an ICE in the compiler:

  % s390-gcc -c -g -O2 -m64 fred.i
  fred.i: In function 'bar':
  fred.i:37:1: internal compiler error: in expand_debug_locations, at
cfgexpand.c:3687

The insn looks like this:

  (debug_insn 6 5 7 2 (var_location:SI temp$union_field$ptr_field (scratch))
fred.i:31 -1 (nil))

but the debug expression associated with it looks like this:

  (debug_expr:DI D#1)

The problem, I believe, is in the assertion at line 3687, not the debug
expression itself.  The expression has been created by converting the gimple
for the right hand side of the assignment on line 31 of fred.i:

   & arg_1(D)->bytes

into tree form.  This conversion chooses DImode since that is the default
pointer mode on this particular target.  The fact that this expression is then
cast to an SImode pointer is irrelevant - the expression itself is a DImode
pointer expression.

I have uploaded a proposed patch for this problem, based on an original patch
created by DJ, but tweaked a little bit by me.  It extends the assetion in
expand_debug_locations() to allow for the fact that pointer expressions might
use multiple modes.

Cheers
  Nick


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

end of thread, other threads:[~2011-12-01 10:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-01 10:36 [Bug debug/51377] New: ICE when generating debug info for targets with multiple pointer sizes nickc at redhat dot com
2011-12-01 10:45 ` [Bug debug/51377] " nickc at redhat dot com
2011-12-01 10:54 ` nickc at redhat dot com

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).