public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/52016] New: [OOP] Polymorphism and elemental: missing diagnostic
@ 2012-01-27 10:18 dominiq at lps dot ens.fr
  2012-01-27 11:03 ` [Bug fortran/52016] " burnus at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-27 10:18 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52016

             Bug #: 52016
           Summary: [OOP] Polymorphism and elemental: missing diagnostic
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dominiq@lps.ens.fr


This PR is probably a duplicate of pr52013 with a fix before submission (see
http://gcc.gnu.org/ml/fortran/2012-01/msg00224.html ;-).

While investigating why the test in pr50981 comment #23 was yielding an ICE
even with the patch from http://gcc.gnu.org/ml/fortran/2012-01/msg00223.html ,
I reduced the origin of the ICE to the following test

    type t
      integer :: a
    end type t
  type(t), allocatable :: var1, var2(:)
  allocate(var1, var2(2))
  call sub_ctae(var2)
 if (any (var2%a /= 9)) call abort()

contains
  elemental subroutine sub_ctae(y)
    class(t), intent(inout), optional :: y(:) ! <-- invalid and gives an ICE
!    class(t), intent(inout), optional :: y ! <-- valid and works
    if (present(y)) y%a = 9
    if (present(y)) i = 7
  end subroutine sub_ctae
end

which gives

pr50981_4_red.f90: In function 'sub_ctae':
pr50981_4_red.f90:13:0: internal compiler error: in
gfc_conv_descriptor_data_get, at fortran/trans-array.c:147

for an unpatched r183306 and

pr50981_4_red.f90: In function 'MAIN__':
pr50981_4_red.f90:6:0: internal compiler error: in fold_convert_loc, at
fold-const.c:2016

for my patched tree.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-01-27 13:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-27 10:18 [Bug fortran/52016] New: [OOP] Polymorphism and elemental: missing diagnostic dominiq at lps dot ens.fr
2012-01-27 11:03 ` [Bug fortran/52016] " burnus at gcc dot gnu.org
2012-01-27 13:07 ` burnus at gcc dot gnu.org
2012-01-27 13:09 ` burnus at gcc dot gnu.org
2012-01-27 14:14 ` burnus at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).