public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/59298] New: ICE when initialising PARAMETER array of derived-type (containing an array) using array constructor
@ 2013-11-26 9:48 adam at aphirst dot karoo.co.uk
2013-11-26 10:00 ` [Bug fortran/59298] " adam at aphirst dot karoo.co.uk
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: adam at aphirst dot karoo.co.uk @ 2013-11-26 9:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59298
Bug ID: 59298
Summary: ICE when initialising PARAMETER array of derived-type
(containing an array) using array constructor
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: adam at aphirst dot karoo.co.uk
Created attachment 31294
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31294&action=edit
Minimal test case (thanks to gmarkall from #fortran for minimising further than
I originally had)
Defining a derived-type which contains an integer 2D array, and then attempting
to initialise a PARAMETER variable of an array of that type using an array
constructor causes an Internal Compiler Error.
== Options used to build test case: ==
gfortran -Wall -Wextra -std=f2008 -march=native -s -c "IBZ.f90" (in directory:
/home/adam/Documents)
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
Compilation failed.
== GCC version and build options: ==
[adam@blaze ~]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc-multilib/src/gcc-4.8.2/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--enable-gnu-unique-object --enable-linker-build-id --enable-cloog-backend=isl
--disable-cloog-version-check --enable-lto --enable-gold --enable-ld=default
--enable-plugin --with-plugin-ld=ld.gold --with-linker-hash-style=gnu
--disable-install-libiberty --enable-multilib --disable-libssp --disable-werror
--enable-checking=release
Thread model: posix
gcc version 4.8.2 (GCC)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/59298] ICE when initialising PARAMETER array of derived-type (containing an array) using array constructor
2013-11-26 9:48 [Bug fortran/59298] New: ICE when initialising PARAMETER array of derived-type (containing an array) using array constructor adam at aphirst dot karoo.co.uk
@ 2013-11-26 10:00 ` adam at aphirst dot karoo.co.uk
2013-11-26 10:44 ` dominiq at lps dot ens.fr
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: adam at aphirst dot karoo.co.uk @ 2013-11-26 10:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59298
Adam Hirst <adam at aphirst dot karoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #31294|0 |1
is obsolete| |
--- Comment #1 from Adam Hirst <adam at aphirst dot karoo.co.uk> ---
Created attachment 31295
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31295&action=edit
Updated minimal test case (corrected a typo)
Whoops, typo in the test-case I submitted. I was accidentally assigning an
array to a scalar inside the function. Not sure how that crept in there.
Anyway, with that 'fixed', the error message on compilation is exactly the
same.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/59298] ICE when initialising PARAMETER array of derived-type (containing an array) using array constructor
2013-11-26 9:48 [Bug fortran/59298] New: ICE when initialising PARAMETER array of derived-type (containing an array) using array constructor adam at aphirst dot karoo.co.uk
2013-11-26 10:00 ` [Bug fortran/59298] " adam at aphirst dot karoo.co.uk
@ 2013-11-26 10:44 ` dominiq at lps dot ens.fr
2014-01-03 11:39 ` janus at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-11-26 10:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59298
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-11-26
Ever confirmed|0 |1
--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
On x86_64-apple-darwin* the ICE is
f951(47525) malloc: *** error for object 0x8: pointer being freed was not
allocated
*** set a breakpoint in malloc_error_break to debug
f951: internal compiler error: Abort trap
The test compiles with gfortran 4.4.7, but ICE with revision 154654
(2009-11-25).
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/59298] ICE when initialising PARAMETER array of derived-type (containing an array) using array constructor
2013-11-26 9:48 [Bug fortran/59298] New: ICE when initialising PARAMETER array of derived-type (containing an array) using array constructor adam at aphirst dot karoo.co.uk
2013-11-26 10:00 ` [Bug fortran/59298] " adam at aphirst dot karoo.co.uk
2013-11-26 10:44 ` dominiq at lps dot ens.fr
@ 2014-01-03 11:39 ` janus at gcc dot gnu.org
2014-01-03 11:47 ` janus at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: janus at gcc dot gnu.org @ 2014-01-03 11:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59298
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |janus at gcc dot gnu.org
--- Comment #3 from janus at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #2)
> The test compiles with gfortran 4.4.7, but ICE with revision 154654
> (2009-11-25).
Segfaults here with
gcc version 4.4.7 (Ubuntu/Linaro 4.4.7-2ubuntu2)
(not sure from which revision this is built)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/59298] ICE when initialising PARAMETER array of derived-type (containing an array) using array constructor
2013-11-26 9:48 [Bug fortran/59298] New: ICE when initialising PARAMETER array of derived-type (containing an array) using array constructor adam at aphirst dot karoo.co.uk
` (2 preceding siblings ...)
2014-01-03 11:39 ` janus at gcc dot gnu.org
@ 2014-01-03 11:47 ` janus at gcc dot gnu.org
2014-11-12 13:09 ` adam at aphirst dot karoo.co.uk
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: janus at gcc dot gnu.org @ 2014-01-03 11:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59298
--- Comment #4 from janus at gcc dot gnu.org ---
Slightly reduced test case:
implicit none
type Plane
integer :: M(1,1)
end type
type(Plane), parameter :: planes(1) = [ Plane(1) ]
integer :: f(1,1)
f = (planes(1)%M)
end
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/59298] ICE when initialising PARAMETER array of derived-type (containing an array) using array constructor
2013-11-26 9:48 [Bug fortran/59298] New: ICE when initialising PARAMETER array of derived-type (containing an array) using array constructor adam at aphirst dot karoo.co.uk
` (3 preceding siblings ...)
2014-01-03 11:47 ` janus at gcc dot gnu.org
@ 2014-11-12 13:09 ` adam at aphirst dot karoo.co.uk
2021-11-26 22:32 ` anlauf at gcc dot gnu.org
2023-09-25 17:05 ` anlauf at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: adam at aphirst dot karoo.co.uk @ 2014-11-12 13:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59298
--- Comment #5 from Adam Hirst <adam at aphirst dot karoo.co.uk> ---
I decided to check on the status of this bug in 4.9.2, as it's been a little
while, and the segmentation fault still occurs.
Interestingly, the test case that Janus posted on 2013-01-03 can be made to
compile and seemingly run correctly if the line
f = (planes(1)%M)
is replaced with
f = planes(1)%M
. and this also holds true for the test case I uploaded on 2013-11-26.
Perhaps this fact is of some interest, or might provide some insight into what
the underlying issue might be?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/59298] ICE when initialising PARAMETER array of derived-type (containing an array) using array constructor
2013-11-26 9:48 [Bug fortran/59298] New: ICE when initialising PARAMETER array of derived-type (containing an array) using array constructor adam at aphirst dot karoo.co.uk
` (4 preceding siblings ...)
2014-11-12 13:09 ` adam at aphirst dot karoo.co.uk
@ 2021-11-26 22:32 ` anlauf at gcc dot gnu.org
2023-09-25 17:05 ` anlauf at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-11-26 22:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59298
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
Status|NEW |WAITING
--- Comment #15 from anlauf at gcc dot gnu.org ---
I do not see any failures on gcc-10 r10-10311, gcc-11 r11-9308 or current
gcc-12 mainline. gcc-9 still fails.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/59298] ICE when initialising PARAMETER array of derived-type (containing an array) using array constructor
2013-11-26 9:48 [Bug fortran/59298] New: ICE when initialising PARAMETER array of derived-type (containing an array) using array constructor adam at aphirst dot karoo.co.uk
` (5 preceding siblings ...)
2021-11-26 22:32 ` anlauf at gcc dot gnu.org
@ 2023-09-25 17:05 ` anlauf at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-09-25 17:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59298
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|WAITING |RESOLVED
Keywords| |ice-on-valid-code
Known to work| |10.5.0
Known to fail| |7.5.0, 8.5.0, 9.5.0
Target Milestone|--- |10.5
--- Comment #16 from anlauf at gcc dot gnu.org ---
Fixed in gcc-10.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-09-25 17:05 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-26 9:48 [Bug fortran/59298] New: ICE when initialising PARAMETER array of derived-type (containing an array) using array constructor adam at aphirst dot karoo.co.uk
2013-11-26 10:00 ` [Bug fortran/59298] " adam at aphirst dot karoo.co.uk
2013-11-26 10:44 ` dominiq at lps dot ens.fr
2014-01-03 11:39 ` janus at gcc dot gnu.org
2014-01-03 11:47 ` janus at gcc dot gnu.org
2014-11-12 13:09 ` adam at aphirst dot karoo.co.uk
2021-11-26 22:32 ` anlauf at gcc dot gnu.org
2023-09-25 17:05 ` anlauf 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).