Bug 48776 - ICE(segfault) after -std=f95 diagnostic error involving PROCEDURE
Summary: ICE(segfault) after -std=f95 diagnostic error involving PROCEDURE
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: error-recovery, ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2011-04-26 18:44 UTC by Tobias Burnus
Modified: 2013-06-16 13:13 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2013-06-16 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2011-04-26 18:44:45 UTC
Follow up to bug 48279 comment 7 and 48279 comment 11.

The following program segfaults with -std=f95 after printing the diagnostic:

    procedure get1
                  1
Error: Fortran 2003: PROCEDURE statement at (1)
f951: internal compiler error: Segmentation fault


Valgrind shows tons of errors, starting with:

==22545== Invalid read of size 8
==22545==    at 0x52FD8C: resolve_symbol (resolve.c:10004)
==22545==    by 0x54BA76: traverse_ns (symbol.c:3379)
==22545==    by 0x53919B: resolve_types (resolve.c:13261)
==22545==    by 0x52E3D3: gfc_resolve (resolve.c:13357)

The testcase:

  interface get
    procedure get1
  end interface

  integer :: h
  call set1 (get (h))
contains
  subroutine set1 (a)
    integer, intent(in) :: a
  end subroutine

  integer function get1 (s)
    integer :: s
  end function
end
Comment 1 Dominique d'Humieres 2013-06-16 13:13:23 UTC
Still present at revision 200128.