Bug 1357207 - Fortran allocatable strings debug info type size regression
Summary: Fortran allocatable strings debug info type size regression
Keywords:
Status: CLOSED DUPLICATE of bug 1366230
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 24
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-16 16:14 UTC by Jan Kratochvil
Modified: 2016-08-11 12:07 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-08-11 12:07:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 71906 0 None None None 2016-07-16 19:46:44 UTC

Description Jan Kratochvil 2016-07-16 16:14:20 UTC
Description of problem:
Some GDB testcases started to failing F23->F24.

Version-Release number of selected component (if applicable):
PASS: gcc-5.3.1-2.fc23.x86_64
FAIL: gcc-6.1.1-3.fc24.x86_64

How reproducible:
Always.

Steps to Reproduce:
cat >stringalloc.f90 <<EOH
program stringalloc
  character(len=:), target, allocatable   :: var_char

  allocate(character(len=10) :: var_char)
  var_char = 'foo'
end program stringalloc
EOH
gfortran -o stringalloc stringalloc.f90 -Wall -g;gdb ./stringalloc -batch -ex 'b 5' -ex r -ex 'ptype var_char'

Actual results:
type = PTR TO -> ( character*1 )
 <2><a4>: Abbrev Number: 8 (DW_TAG_variable)
    <a5>   DW_AT_name        : (indirect string, offset: 0x111): var_char
    <a9>   DW_AT_decl_file   : 1
    <aa>   DW_AT_decl_line   : 2
    <ab>   DW_AT_type        : <0xd1>
    <af>   DW_AT_location    : 2 byte block: 91 68      (DW_OP_fbreg: -24)
 <1><d0>: Abbrev Number: 11 (DW_TAG_string_type)
 <1><d1>: Abbrev Number: 6 (DW_TAG_pointer_type)
    <d2>   DW_AT_byte_size   : 8
    <d3>   DW_AT_type        : <0xd0>

Expected results:
type = PTR TO -> ( character*10 )
 <2><4c>: Abbrev Number: 3 (DW_TAG_variable)
    <4d>   DW_AT_name        : (indirect string, offset: 0x111): var_char
    <51>   DW_AT_decl_file   : 1
    <52>   DW_AT_decl_line   : 2
    <53>   DW_AT_type        : <0x7d>
    <57>   DW_AT_location    : 2 byte block: 91 68      (DW_OP_fbreg: -24)
 <1><78>: Abbrev Number: 6 (DW_TAG_string_type)
    <79>   DW_AT_string_length: 2 byte block: 91 64     (DW_OP_fbreg: -28)
    <7c>   DW_AT_byte_size   : 4
 <1><7d>: Abbrev Number: 7 (DW_TAG_pointer_type)
    <7e>   DW_AT_byte_size   : 8
    <7f>   DW_AT_type        : <0x78>

Additional info:
There is also some additional unknown DIE but that does not seem to be related:
 <2><5a>: Abbrev Number: 4 (DW_TAG_variable)
    <5b>   DW_AT_name        : (indirect string, offset: 0x110): .var_char
    <5f>   DW_AT_type        : <0x83>
    <63>   DW_AT_artificial  : 1
    <63>   DW_AT_location    : 2 byte block: 91 64      (DW_OP_fbreg: -28)
 <1><83>: Abbrev Number: 8 (DW_TAG_base_type)
    <84>   DW_AT_byte_size   : 4
    <85>   DW_AT_encoding    : 5        (signed)
    <86>   DW_AT_name        : (indirect string, offset: 0xeb): integer(kind=4)

Comment 1 Jan Kratochvil 2016-08-11 12:07:22 UTC

*** This bug has been marked as a duplicate of bug 1366230 ***


Note You need to log in before you can comment on or make changes to this bug.