public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/42800]  New: VLA DW_AT_upper_bound is no longer emitted
@ 2010-01-19 10:05 jan dot kratochvil at redhat dot com
  2010-01-19 10:22 ` [Bug debug/42800] [4.5 Regression] " rguenth at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2010-01-19 10:05 UTC (permalink / raw)
  To: gcc-bugs

FAIL: gcc (GCC) 4.5.0 20100119 (experimental)
PASS: gcc (GCC) 4.4.3 20100119 (prerelease)
PASS: gcc-4.4.2-20.fc12.x86_64 (Fedora 12)
-------------------------------------------------------------------------------
gcc -c -o vla.o vla.c -Wall -g
-------------------------------------------------------------------------------
This is a 4.4 -> 4.5 debug regression.
-------------------------------------------------------------------------------
int
f (int i)
{
  char a[i];

  return a[0];
}
-------------------------------------------------------------------------------
FAIL:
    < c>   DW_AT_producer    : (indirect string, offset: 0x11): GNU C 4.5.0
20100119 (experimental)     
 <2><5c>: Abbrev Number: 4 (DW_TAG_variable)
    <5d>   DW_AT_name        : a        
    <61>   DW_AT_type        : <0x71>   
    <65>   DW_AT_location    : 3 byte block: 91 60 6    (DW_OP_fbreg: -32;
DW_OP_deref)
 <1><71>: Abbrev Number: 6 (DW_TAG_array_type)
    <72>   DW_AT_type        : <0x83>   
 <2><7a>: Abbrev Number: 7 (DW_TAG_subrange_type)
    <7b>   DW_AT_type        : <0x80>   
-------------------------------------------------------------------------------
PASS:
    < c>   DW_AT_producer    : (indirect string, offset: 0x17): GNU C 4.4.3
20100119 (prerelease)       
 <2><5c>: Abbrev Number: 4 (DW_TAG_variable)
    <5d>   DW_AT_name        : a        
    <61>   DW_AT_type        : <0x71>   
    <65>   DW_AT_location    : 3 byte block: 91 68 6    (DW_OP_fbreg: -24;
DW_OP_deref)
 <1><71>: Abbrev Number: 6 (DW_TAG_array_type)
    <72>   DW_AT_type        : <0x87>   
 <2><7a>: Abbrev Number: 7 (DW_TAG_subrange_type)
    <7b>   DW_AT_type        : <0x84>   
    <7f>   DW_AT_upper_bound : 3 byte block: 91 60 6    (DW_OP_fbreg: -32;
DW_OP_deref)


-- 
           Summary: VLA DW_AT_upper_bound is no longer emitted
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jan dot kratochvil at redhat dot com
GCC target triplet: x86_64-unknown-linux-gnu


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


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

* [Bug debug/42800] [4.5 Regression] VLA DW_AT_upper_bound is no longer emitted
  2010-01-19 10:05 [Bug debug/42800] New: VLA DW_AT_upper_bound is no longer emitted jan dot kratochvil at redhat dot com
@ 2010-01-19 10:22 ` rguenth at gcc dot gnu dot org
  2010-01-19 15:44 ` hjl dot tools at gmail dot com
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-19 10:22 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|VLA DW_AT_upper_bound is no |[4.5 Regression] VLA
                   |longer emitted              |DW_AT_upper_bound is no
                   |                            |longer emitted
   Target Milestone|---                         |4.5.0


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


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

* [Bug debug/42800] [4.5 Regression] VLA DW_AT_upper_bound is no longer emitted
  2010-01-19 10:05 [Bug debug/42800] New: VLA DW_AT_upper_bound is no longer emitted jan dot kratochvil at redhat dot com
  2010-01-19 10:22 ` [Bug debug/42800] [4.5 Regression] " rguenth at gcc dot gnu dot org
@ 2010-01-19 15:44 ` hjl dot tools at gmail dot com
  2010-01-19 15:49 ` matz at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-01-19 15:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from hjl dot tools at gmail dot com  2010-01-19 15:43 -------
It is caused by Expand from SSA:

http://gcc.gnu.org/ml/gcc-cvs/2009-04/msg01459.html


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matz at gcc dot gnu dot org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-01-19 15:43:55
               date|                            |


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


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

* [Bug debug/42800] [4.5 Regression] VLA DW_AT_upper_bound is no longer emitted
  2010-01-19 10:05 [Bug debug/42800] New: VLA DW_AT_upper_bound is no longer emitted jan dot kratochvil at redhat dot com
  2010-01-19 10:22 ` [Bug debug/42800] [4.5 Regression] " rguenth at gcc dot gnu dot org
  2010-01-19 15:44 ` hjl dot tools at gmail dot com
@ 2010-01-19 15:49 ` matz at gcc dot gnu dot org
  2010-01-19 15:53 ` hjl dot tools at gmail dot com
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: matz at gcc dot gnu dot org @ 2010-01-19 15:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from matz at gcc dot gnu dot org  2010-01-19 15:49 -------
What's the brokenness?  The missing upper bound in the subrange type?


-- 


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


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

* [Bug debug/42800] [4.5 Regression] VLA DW_AT_upper_bound is no longer emitted
  2010-01-19 10:05 [Bug debug/42800] New: VLA DW_AT_upper_bound is no longer emitted jan dot kratochvil at redhat dot com
                   ` (2 preceding siblings ...)
  2010-01-19 15:49 ` matz at gcc dot gnu dot org
@ 2010-01-19 15:53 ` hjl dot tools at gmail dot com
  2010-01-19 17:19 ` jakub at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-01-19 15:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from hjl dot tools at gmail dot com  2010-01-19 15:52 -------
(In reply to comment #2)
> What's the brokenness?  The missing upper bound in the subrange type?
> 

It blocks PR 42801.


-- 


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


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

* [Bug debug/42800] [4.5 Regression] VLA DW_AT_upper_bound is no longer emitted
  2010-01-19 10:05 [Bug debug/42800] New: VLA DW_AT_upper_bound is no longer emitted jan dot kratochvil at redhat dot com
                   ` (3 preceding siblings ...)
  2010-01-19 15:53 ` hjl dot tools at gmail dot com
@ 2010-01-19 17:19 ` jakub at gcc dot gnu dot org
  2010-01-27  9:35 ` jakub at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-01-19 17:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2010-01-19 17:19 -------
Yes.  This is -O0, so we definitely should ensure that the debug info has the
correct upper bound.
Look at gimplify_type_sizes which for -O0 clears DECL_IGNORED_P on the
temporaries to make sure they are not optimized out.  That worked well in 4.4,
but probably doesn't work any longer.


-- 


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


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

* [Bug debug/42800] [4.5 Regression] VLA DW_AT_upper_bound is no longer emitted
  2010-01-19 10:05 [Bug debug/42800] New: VLA DW_AT_upper_bound is no longer emitted jan dot kratochvil at redhat dot com
                   ` (4 preceding siblings ...)
  2010-01-19 17:19 ` jakub at gcc dot gnu dot org
@ 2010-01-27  9:35 ` jakub at gcc dot gnu dot org
  2010-02-19 18:01 ` jason at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-01-27  9:35 UTC (permalink / raw)
  To: gcc-bugs



-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


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

* [Bug debug/42800] [4.5 Regression] VLA DW_AT_upper_bound is no longer emitted
  2010-01-19 10:05 [Bug debug/42800] New: VLA DW_AT_upper_bound is no longer emitted jan dot kratochvil at redhat dot com
                   ` (5 preceding siblings ...)
  2010-01-27  9:35 ` jakub at gcc dot gnu dot org
@ 2010-02-19 18:01 ` jason at gcc dot gnu dot org
  2010-02-19 20:13 ` jason at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-02-19 18:01 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2010-01-19 15:43:55         |2010-02-19 18:01:22
               date|                            |


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


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

* [Bug debug/42800] [4.5 Regression] VLA DW_AT_upper_bound is no longer emitted
  2010-01-19 10:05 [Bug debug/42800] New: VLA DW_AT_upper_bound is no longer emitted jan dot kratochvil at redhat dot com
                   ` (6 preceding siblings ...)
  2010-02-19 18:01 ` jason at gcc dot gnu dot org
@ 2010-02-19 20:13 ` jason at gcc dot gnu dot org
  2010-02-19 20:59 ` jason at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-02-19 20:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jason at gcc dot gnu dot org  2010-02-19 20:13 -------
The problem is that instantiate_decl_rtl isn't being run on the rtl for the
upper bound temporary, because it isn't visible to instantiate_decls.  This
happens because even though the temp got added to cfun->local_decls,
expand_used_vars clears it out before instantiate_decls gets a chance to look
at it.


-- 


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


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

* [Bug debug/42800] [4.5 Regression] VLA DW_AT_upper_bound is no longer emitted
  2010-01-19 10:05 [Bug debug/42800] New: VLA DW_AT_upper_bound is no longer emitted jan dot kratochvil at redhat dot com
                   ` (7 preceding siblings ...)
  2010-02-19 20:13 ` jason at gcc dot gnu dot org
@ 2010-02-19 20:59 ` jason at gcc dot gnu dot org
  2010-02-20  5:16 ` jason at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-02-19 20:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jason at gcc dot gnu dot org  2010-02-19 20:59 -------
Yeah, the Expand from SSA patch broke Jakub's fix for PR 34037.  I'm testing a
patch that just tweaks the logic a bit to make it work again.


-- 


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


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

* [Bug debug/42800] [4.5 Regression] VLA DW_AT_upper_bound is no longer emitted
  2010-01-19 10:05 [Bug debug/42800] New: VLA DW_AT_upper_bound is no longer emitted jan dot kratochvil at redhat dot com
                   ` (8 preceding siblings ...)
  2010-02-19 20:59 ` jason at gcc dot gnu dot org
@ 2010-02-20  5:16 ` jason at gcc dot gnu dot org
  2010-02-23 18:33 ` jason at gcc dot gnu dot org
  2010-02-23 18:33 ` jason at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-02-20  5:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jason at gcc dot gnu dot org  2010-02-20 05:16 -------
Created an attachment (id=19929)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19929&action=view)
patch


-- 


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


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

* [Bug debug/42800] [4.5 Regression] VLA DW_AT_upper_bound is no longer emitted
  2010-01-19 10:05 [Bug debug/42800] New: VLA DW_AT_upper_bound is no longer emitted jan dot kratochvil at redhat dot com
                   ` (10 preceding siblings ...)
  2010-02-23 18:33 ` jason at gcc dot gnu dot org
@ 2010-02-23 18:33 ` jason at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-02-23 18:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jason at gcc dot gnu dot org  2010-02-23 18:32 -------
Subject: Bug 42800

Author: jason
Date: Tue Feb 23 18:32:09 2010
New Revision: 157014

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157014
Log:
        PR debug/42800
        * cfgexpand.c (expand_used_vars): Keep artificial non-ignored vars
        in cfun->local_decls even if they have register types.

Added:
    trunk/gcc/testsuite/c-c++-common/dwarf2/
    trunk/gcc/testsuite/c-c++-common/dwarf2/vla1.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cfgexpand.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp
    trunk/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp


-- 


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


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

* [Bug debug/42800] [4.5 Regression] VLA DW_AT_upper_bound is no longer emitted
  2010-01-19 10:05 [Bug debug/42800] New: VLA DW_AT_upper_bound is no longer emitted jan dot kratochvil at redhat dot com
                   ` (9 preceding siblings ...)
  2010-02-20  5:16 ` jason at gcc dot gnu dot org
@ 2010-02-23 18:33 ` jason at gcc dot gnu dot org
  2010-02-23 18:33 ` jason at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-02-23 18:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jason at gcc dot gnu dot org  2010-02-23 18:32 -------
Fixed.


-- 

jason at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2010-02-23 18:33 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-19 10:05 [Bug debug/42800] New: VLA DW_AT_upper_bound is no longer emitted jan dot kratochvil at redhat dot com
2010-01-19 10:22 ` [Bug debug/42800] [4.5 Regression] " rguenth at gcc dot gnu dot org
2010-01-19 15:44 ` hjl dot tools at gmail dot com
2010-01-19 15:49 ` matz at gcc dot gnu dot org
2010-01-19 15:53 ` hjl dot tools at gmail dot com
2010-01-19 17:19 ` jakub at gcc dot gnu dot org
2010-01-27  9:35 ` jakub at gcc dot gnu dot org
2010-02-19 18:01 ` jason at gcc dot gnu dot org
2010-02-19 20:13 ` jason at gcc dot gnu dot org
2010-02-19 20:59 ` jason at gcc dot gnu dot org
2010-02-20  5:16 ` jason at gcc dot gnu dot org
2010-02-23 18:33 ` jason at gcc dot gnu dot org
2010-02-23 18:33 ` jason at gcc dot gnu dot 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).