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

--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> 
---

Some variations :


$ cat z2.f90
subroutine f(x)
  structure /s1/
    union
      integer i
    end union
  end structure
  record /s1/ x
  x.i = 0
end
subroutine g
  structure /s1/
    union
    end union
  end structure
  record /s1/ x
  call f(x)
end


$ cat z3.f90
subroutine f(x)
  structure /s1/
    union
    end union
  end structure
  record /s1/ x
  x.i = 0
end
subroutine g
  structure /s1/
    union
    end union
  end structure
  record /s1/ x
  call f(x)
end


$ gfortran-7-20160925 -fdec -c z3.f90
z3.f90:7:5:

   x.i = 0
     1
Error: 'i' at (1) is not a member of the 'S1' structure
f951: internal compiler error: Segmentation fault
0xc28c9f crash_signal
        ../../gcc/toplev.c:337
0x694783 gfc_compare_union_types(gfc_symbol*, gfc_symbol*)
        ../../gcc/fortran/interface.c:544
0x69469a compare_components
        ../../gcc/fortran/interface.c:502
#...

Reply via email to