[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    [Bug fortran/91939] New: ICE as segmentation violation for invalid code
From:       "juergen.reuter at desy dot de" <gcc-bugzilla () gcc ! gnu ! org>
Date:       2019-09-30 16:15:03
Message-ID: bug-91939-4 () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91939

            Bug ID: 91939
           Summary: ICE as segmentation violation for invalid code
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: juergen.reuter at desy dot de
  Target Milestone: ---

The following code gives an ICE as segmentation violation, it was discussed on
c.l.f. on Sep. 30. I believe that the code is not valid though it is compiled
in ifort, nagfor vetoes it, saying that the object t of type mytype is default
initialized, and hence its subobject t%b is not permitted in a data statement:
module ek
  type:: mytype
     real:: a=1.0
     real:: b
  end type mytype
end module ek

program test
  use ek
  type(mytype):: t
  data t%b/2.0/
  write(6,*) t
  stop
end program test=
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic