public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/34143]  New: alloc_comp_constructor.f90 fails with -fdefault-integer-8
@ 2007-11-18 20:02 tkoenig at gcc dot gnu dot org
  2007-11-18 21:48 ` [Bug fortran/34143] " jvdelisle at gcc dot gnu dot org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2007-11-18 20:02 UTC (permalink / raw)
  To: gcc-bugs

Reduced from a failure of alloc_comp_constructor.f90
with -fdefault-integer-8 on i686-pc-linux-gnu:

$ cat alloc_1.f90 
Program test_constructor

    implicit none

    type :: thytype
        integer(4) :: a(2,2)
    end type thytype

    type :: mytype
        integer(4), allocatable :: a(:, :)
        type(thytype), allocatable :: q(:)
    end type mytype

    type (mytype) :: x
    integer, allocatable :: yy(:,:)
    type (thytype), allocatable :: bar(:)

    ! Check that unallocated allocatables work
    x = mytype(yy, bar)
    if (allocated(x%a) .or. allocated(x%q)) call abort()

end program test_constructor
$ gfortran alloc_1.f90 
$ ./a.out
$ gfortran -fdefault-integer-8 alloc_1.f90 
$ ./a.out
Fortran runtime error: Attempt to allocate a negative amount of memory.


-- 
           Summary: alloc_comp_constructor.f90 fails with -fdefault-integer-
                    8
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tkoenig at gcc dot gnu dot org
OtherBugsDependingO 32770
             nThis:


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


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

end of thread, other threads:[~2008-11-30  7:51 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-18 20:02 [Bug fortran/34143] New: alloc_comp_constructor.f90 fails with -fdefault-integer-8 tkoenig at gcc dot gnu dot org
2007-11-18 21:48 ` [Bug fortran/34143] " jvdelisle at gcc dot gnu dot org
2007-11-18 22:04 ` tkoenig at gcc dot gnu dot org
2007-11-18 23:41 ` jvdelisle at gcc dot gnu dot org
2007-11-20 13:04 ` fxcoudert at gcc dot gnu dot org
2007-11-22  8:56 ` fxcoudert at gcc dot gnu dot org
2007-11-22 13:18 ` burnus at gcc dot gnu dot org
2007-11-29 11:25 ` fxcoudert at gcc dot gnu dot org
2007-11-30  7:49 ` pault at gcc dot gnu dot org
2008-02-05 12:58 ` pault at gcc dot gnu dot org
2008-02-05 13:05 ` pault at gcc dot gnu dot org
2008-02-06  8:34 ` pault at gcc dot gnu dot org
2008-02-06  9:10 ` burnus at gcc dot gnu dot org
2008-02-11 17:48 ` pault at gcc dot gnu dot org
2008-02-12 10:55 ` dominiq at lps dot ens dot fr
2008-11-24  6:37 ` pault at gcc dot gnu dot org
2008-11-27 13:23 ` burnus at gcc dot gnu dot org
2008-11-29 20:45 ` pault at gcc dot gnu dot org
2008-11-30  7:51 ` 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).