public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/67802] New: ICE on initializing character with wrong len type
@ 2015-10-01 17:40 gerhard.steinmetz.fortran@t-online.de
  2015-10-01 17:42 ` [Bug fortran/67802] " gerhard.steinmetz.fortran@t-online.de
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-10-01 17:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 67802
           Summary: ICE on initializing character with wrong len type
           Product: gcc
           Version: 5.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fortran@t-online.de
  Target Milestone: ---

With a wrong data type for len instead of a scalar-int-expr :

$ cat za2.f90
program p
   character(1.) :: c1 = ' '
   character(1d1) :: c2 = ' '
   character((0.,1.)) :: c3 = ' '
   character(.true.) :: c4 = ' '
end

$ gfortran -g -O0 -Wall -fcheck=all -fno-frontend-optimize za2.f90
f951: internal compiler error: Segmentation fault

---

Same issue for these variations :

$ cat za3.f90
program p
   character(1.), parameter :: c1 = ' '
   character(1d1), parameter :: c2 = ' '
   character((0.,1.)), parameter :: c3 = ' '
   character(.true.), parameter :: c4 = ' '
end


$ cat zp2.f90
program p
   real, parameter :: n1 = 1.
   double precision, parameter :: n2 = 1d1
   complex, parameter :: n3 = (0.,1.)
   logical, parameter :: n4 = .true.
   character(n1) :: c1 = ' '
   character(n2) :: c2 = ' '
   character(n3) :: c3 = ' '
   character(n4) :: c4 = ' '
end


$ cat zp3.f90
program p
   real, parameter :: n1 = 1.
   double precision, parameter :: n2 = 1d1
   complex, parameter :: n3 = (0.,1.)
   logical, parameter :: n4 = .true.
   character(n1), parameter :: c1 = ' '
   character(n2), parameter :: c2 = ' '
   character(n3), parameter :: c3 = ' '
   character(n4), parameter :: c4 = ' '
end


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

end of thread, other threads:[~2015-10-02 21:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-01 17:40 [Bug fortran/67802] New: ICE on initializing character with wrong len type gerhard.steinmetz.fortran@t-online.de
2015-10-01 17:42 ` [Bug fortran/67802] " gerhard.steinmetz.fortran@t-online.de
2015-10-01 18:31 ` kargl at gcc dot gnu.org
2015-10-02 21:27 ` kargl at gcc dot gnu.org
2015-10-02 21:29 ` kargl 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).