public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/66911] New: ICE on allocate character with source as a derived type component
@ 2015-07-17 13:48 pascal22p at parois dot net
2015-07-17 16:35 ` [Bug fortran/66911] " dominiq at lps dot ens.fr
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: pascal22p at parois dot net @ 2015-07-17 13:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66911
Bug ID: 66911
Summary: ICE on allocate character with source as a derived
type component
Product: gcc
Version: 5.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: pascal22p at parois dot net
Target Milestone: ---
Created attachment 36005
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36005&action=edit
test case
Hi,
gcc 5.1.0 gives an ICE on the test case attached. gcc 4.9.0 compiles it but
gives the wrong answer.
a character is allocated using a character allocatable inside a derived type as
a source.
[]$ gfortran51 -fcheck=all -g f.f90 -o test
f.f90:15:0:
allocate(s, source=environment_table(1)%key)
1
internal compiler error: in gfc_trans_allocate, at fortran/trans-stmt.c:5291
0x6fe2bd gfc_trans_allocate(gfc_code*)
../../gcc/fortran/trans-stmt.c:5291
0x69dc17 trans_code
../../gcc/fortran/trans.c:1820
0x6bd833 gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:5841
0x65bb30 translate_all_program_units
../../gcc/fortran/parse.c:5341
0x65bb30 gfc_parse_file()
../../gcc/fortran/parse.c:5538
0x69afe5 gfc_be_parse_file
../../gcc/fortran/f95-lang.c:228
Please submit a full bug report,
with preprocessed source if appropriate.
Regards,
Pascal
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/66911] ICE on allocate character with source as a derived type component
2015-07-17 13:48 [Bug fortran/66911] New: ICE on allocate character with source as a derived type component pascal22p at parois dot net
@ 2015-07-17 16:35 ` dominiq at lps dot ens.fr
2015-07-17 18:02 ` kargl at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-07-17 16:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66911
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-07-17
CC| |vehre at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Confirmed on gcc version 5.1.1 20150612, but this has been fixed on trunk (6.0)
likely at r223445 (pr65548: r222994 gives the ICE).
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/66911] ICE on allocate character with source as a derived type component
2015-07-17 13:48 [Bug fortran/66911] New: ICE on allocate character with source as a derived type component pascal22p at parois dot net
2015-07-17 16:35 ` [Bug fortran/66911] " dominiq at lps dot ens.fr
@ 2015-07-17 18:02 ` kargl at gcc dot gnu.org
2015-07-17 18:21 ` dominiq at lps dot ens.fr
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-07-17 18:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66911
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
--- Comment #2 from kargl at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #1)
> Confirmed on gcc version 5.1.1 20150612, but this has been fixed on trunk
> (6.0) likely at r223445 (pr65548: r222994 gives the ICE).
troutmask:sgk[211] gfc6 -o z rt.f90
troutmask:sgk[212] ./z
1
2
Segmentation fault (core dumped)
Are you sure it's fixed on trunk?
(gdb) run ./z
Starting program: /mnt/sgk/tmp/z ./z
1
2
Program received signal SIGSEGV, Segmentation fault.
0x00000000004022c2 in g_mod::env_table_add (key=..., valeur=..., _key=3,
_valeur=2) at rt.f90:30
30 environment_table(size(temp)+1)%key=key
gfc6 is gcc version 6.0.0 20150716
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/66911] ICE on allocate character with source as a derived type component
2015-07-17 13:48 [Bug fortran/66911] New: ICE on allocate character with source as a derived type component pascal22p at parois dot net
2015-07-17 16:35 ` [Bug fortran/66911] " dominiq at lps dot ens.fr
2015-07-17 18:02 ` kargl at gcc dot gnu.org
@ 2015-07-17 18:21 ` dominiq at lps dot ens.fr
2015-08-07 21:39 ` mikael at gcc dot gnu.org
2015-08-11 9:25 ` pascal22p at parois dot net
4 siblings, 0 replies; 6+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-07-17 18:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66911
--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
[Book15] f90/bug% gfc pr66911.f90 -fsanitize=address
[Book15] f90/bug% a.out
s:"" derived:"tt"
[Book15] f90/bug% gfc -v
Using built-in specs.
COLLECT_GCC=gfc
COLLECT_LTO_WRAPPER=/opt/gcc/gcc6w/libexec/gcc/x86_64-apple-darwin14.4.0/6.0.0/lto-wrapper
Target: x86_64-apple-darwin14.4.0
Configured with: ../work/configure --prefix=/opt/gcc/gcc6w
--enable-languages=c,c++,fortran,objc,obj-c++,ada,java,lto
--with-gmp=/opt/mp-new --with-system-zlib --with-isl=/opt/mp-new --enable-lto
--enable-plugin --with-arch=corei7 --with-cpu=corei7
Thread model: posix
gcc version 6.0.0 20150717 (experimental) [trunk revision 225931] (GCC)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/66911] ICE on allocate character with source as a derived type component
2015-07-17 13:48 [Bug fortran/66911] New: ICE on allocate character with source as a derived type component pascal22p at parois dot net
` (2 preceding siblings ...)
2015-07-17 18:21 ` dominiq at lps dot ens.fr
@ 2015-08-07 21:39 ` mikael at gcc dot gnu.org
2015-08-11 9:25 ` pascal22p at parois dot net
4 siblings, 0 replies; 6+ messages in thread
From: mikael at gcc dot gnu.org @ 2015-08-07 21:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66911
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
CC| |mikael at gcc dot gnu.org
--- Comment #5 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #3)
> [Book15] f90/bug% gfc pr66911.f90 -fsanitize=address
> [Book15] f90/bug% a.out
> s:"" derived:"tt"
>
Hum, I believe the expected output is
s:"tt" derived:"tt"
isn't it?
Which makes this a wrong code.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/66911] ICE on allocate character with source as a derived type component
2015-07-17 13:48 [Bug fortran/66911] New: ICE on allocate character with source as a derived type component pascal22p at parois dot net
` (3 preceding siblings ...)
2015-08-07 21:39 ` mikael at gcc dot gnu.org
@ 2015-08-11 9:25 ` pascal22p at parois dot net
4 siblings, 0 replies; 6+ messages in thread
From: pascal22p at parois dot net @ 2015-08-11 9:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66911
--- Comment #6 from Pascal <pascal22p at parois dot net> ---
Hi,
Yes, sorry. I did not state the expected output which is:
s:"tt" derived:"tt"
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-08-11 9:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-17 13:48 [Bug fortran/66911] New: ICE on allocate character with source as a derived type component pascal22p at parois dot net
2015-07-17 16:35 ` [Bug fortran/66911] " dominiq at lps dot ens.fr
2015-07-17 18:02 ` kargl at gcc dot gnu.org
2015-07-17 18:21 ` dominiq at lps dot ens.fr
2015-08-07 21:39 ` mikael at gcc dot gnu.org
2015-08-11 9:25 ` pascal22p at parois dot net
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).