public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/33998]  New: ICE in make_decl_rtl, at varasm.c:1263
@ 2007-11-05 22:04 burnus at gcc dot gnu dot org
  2007-11-05 23:46 ` [Bug fortran/33998] " fxcoudert at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-11-05 22:04 UTC (permalink / raw)
  To: gcc-bugs

Found at
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/f222faf1eb571cba

The following program crashes a couple of compilers, including gfortran 4.1.x
to 4.3.0. The error message is:

sdsd.f90: In function 'len_test':
sdsd.f90:23: internal compiler error: in make_decl_rtl, at varasm.c:1263

This is the following assert:

  /* A weak alias has TREE_PUBLIC set but not the other bits.  */
  gcc_assert (TREE_CODE (decl) != VAR_DECL
              || TREE_STATIC (decl)
              || TREE_PUBLIC (decl)
              || DECL_EXTERNAL (decl)
              || DECL_REGISTER (decl));

 * * *

Using NAG f95, the following program compiles and prints "01234567890".


module test
   implicit none
   contains
      function my_string(x)
         integer i
         real, intent(in) :: x(:)
         character(0) h4(1:minval([(1,i=1,0)],1))
         character(0) sv1(size(x,1):size(h4))
         character(0) sv2(2*lbound(sv1,1):size(h4))
         character(lbound(sv2,1)-3) my_string

         do i = 1, len(my_string)
            my_string(i:i) = achar(modulo(i-1,10)+iachar('0'))
         end do
      end function my_string
end module test

program len_test
   use test
   implicit none
   real x(7)

   write(*,*) my_string(x) ! <<< Line 23
end program len_test


-- 
           Summary: ICE in make_decl_rtl, at varasm.c:1263
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


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

end of thread, other threads:[~2007-12-16 11:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-05 22:04 [Bug fortran/33998] New: ICE in make_decl_rtl, at varasm.c:1263 burnus at gcc dot gnu dot org
2007-11-05 23:46 ` [Bug fortran/33998] " fxcoudert at gcc dot gnu dot org
2007-11-06 11:50 ` pault at gcc dot gnu dot org
2007-11-17 17:07 ` pault at gcc dot gnu dot org
2007-11-30 17:06 ` pault at gcc dot gnu dot org
2007-12-03 15:05 ` pault at gcc dot gnu dot org
2007-12-16 11:34 ` pault at gcc dot gnu dot org
2007-12-16 11:42 ` pault at gcc dot gnu dot 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).