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

Reply via email to