public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/95879] New: [10/11 Regression] ICE in gfc_get_derived_type, at fortran/trans-types.c:2729
@ 2020-06-24 18:49 gscfq@t-online.de
2020-06-24 18:50 ` [Bug fortran/95879] " gscfq@t-online.de
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: gscfq@t-online.de @ 2020-06-24 18:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95879
Bug ID: 95879
Summary: [10/11 Regression] ICE in gfc_get_derived_type, at
fortran/trans-types.c:2729
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Changed between 20190630 and 20190728 :
$ cat z1.f90
module m
contains
integer function f(x) bind(c)
use iso_c_binding
contains
subroutine s
c_funloc(f) = x
end
end
end
$ cat z2.f90
module m
contains
integer function f(x)
use iso_c_binding
contains
subroutine s
c_funloc(f) = x
end
end
end
$ gfortran-10-20190630 -c z1.f90
$
$ gfortran-11-20200621 -c z1.f90
f951: internal compiler error: Segmentation fault
0xbce57f crash_signal
../../gcc/toplev.c:328
0x6d07a5 gfc_resolve_formal_arglist(gfc_symbol*)
../../gcc/fortran/resolve.c:313
0x6ebde2 do_traverse_symtree
../../gcc/fortran/symbol.c:4162
0x6d0fc3 resolve_formal_arglists
../../gcc/fortran/resolve.c:563
0x6d0fc3 resolve_contained_functions
../../gcc/fortran/resolve.c:1129
0x6d0fc3 resolve_types
../../gcc/fortran/resolve.c:17164
0x6d11a0 resolve_types
../../gcc/fortran/resolve.c:17186
0x6d11a0 resolve_types
../../gcc/fortran/resolve.c:17186
0x6cc7ac gfc_resolve(gfc_namespace*)
../../gcc/fortran/resolve.c:17290
0x6b46f2 gfc_parse_file()
../../gcc/fortran/parse.c:6448
0x70098f gfc_be_parse_file
../../gcc/fortran/f95-lang.c:212
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/95879] [10/11 Regression] ICE in gfc_get_derived_type, at fortran/trans-types.c:2729
2020-06-24 18:49 [Bug fortran/95879] New: [10/11 Regression] ICE in gfc_get_derived_type, at fortran/trans-types.c:2729 gscfq@t-online.de
@ 2020-06-24 18:50 ` gscfq@t-online.de
2020-06-25 7:10 ` [Bug fortran/95879] [10/11 Regression] ICE in gfc_resolve_formal_arglist, at fortran/resolve.c:313 marxin at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: gscfq@t-online.de @ 2020-06-24 18:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95879
G. Steinmetz <gscfq@t-online.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
--- Comment #1 from G. Steinmetz <gscfq@t-online.de> ---
While not embedded :
$ cat y1.f90
module m
contains
integer function f(x) bind(c)
use iso_c_binding
c_funloc(f) = x
end
end
$ cat y2.f90
module m
contains
integer function f(x)
use iso_c_binding
c_funloc(f) = x
end
end
$ gfortran-11-20200621 -c y2.f90
y2.f90:5:15:
5 | c_funloc(f) = x
| 1
Error: Function result 'f' at (1) is invalid as X argument to C_FUNLOC
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/95879] [10/11 Regression] ICE in gfc_resolve_formal_arglist, at fortran/resolve.c:313
2020-06-24 18:49 [Bug fortran/95879] New: [10/11 Regression] ICE in gfc_get_derived_type, at fortran/trans-types.c:2729 gscfq@t-online.de
2020-06-24 18:50 ` [Bug fortran/95879] " gscfq@t-online.de
@ 2020-06-25 7:10 ` marxin at gcc dot gnu.org
2020-06-25 7:35 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-06-25 7:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95879
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
Ever confirmed|0 |1
Last reconfirmed| |2020-06-25
Status|UNCONFIRMED |NEW
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
All releases I have (4.8.0+) fail.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/95879] [10/11 Regression] ICE in gfc_resolve_formal_arglist, at fortran/resolve.c:313
2020-06-24 18:49 [Bug fortran/95879] New: [10/11 Regression] ICE in gfc_get_derived_type, at fortran/trans-types.c:2729 gscfq@t-online.de
2020-06-24 18:50 ` [Bug fortran/95879] " gscfq@t-online.de
2020-06-25 7:10 ` [Bug fortran/95879] [10/11 Regression] ICE in gfc_resolve_formal_arglist, at fortran/resolve.c:313 marxin at gcc dot gnu.org
@ 2020-06-25 7:35 ` rguenth at gcc dot gnu.org
2020-07-23 6:51 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-06-25 7:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95879
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |10.2
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/95879] [10/11 Regression] ICE in gfc_resolve_formal_arglist, at fortran/resolve.c:313
2020-06-24 18:49 [Bug fortran/95879] New: [10/11 Regression] ICE in gfc_get_derived_type, at fortran/trans-types.c:2729 gscfq@t-online.de
` (2 preceding siblings ...)
2020-06-25 7:35 ` rguenth at gcc dot gnu.org
@ 2020-07-23 6:51 ` rguenth at gcc dot gnu.org
2020-10-12 12:51 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-23 6:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95879
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.2 |10.3
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10.2 is released, adjusting target milestone.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/95879] [10/11 Regression] ICE in gfc_resolve_formal_arglist, at fortran/resolve.c:313
2020-06-24 18:49 [Bug fortran/95879] New: [10/11 Regression] ICE in gfc_get_derived_type, at fortran/trans-types.c:2729 gscfq@t-online.de
` (3 preceding siblings ...)
2020-07-23 6:51 ` rguenth at gcc dot gnu.org
@ 2020-10-12 12:51 ` rguenth at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-12 12:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95879
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/95879] [10/11 Regression] ICE in gfc_resolve_formal_arglist, at fortran/resolve.c:313
2020-06-24 18:49 [Bug fortran/95879] New: [10/11 Regression] ICE in gfc_get_derived_type, at fortran/trans-types.c:2729 gscfq@t-online.de
` (4 preceding siblings ...)
2020-10-12 12:51 ` rguenth at gcc dot gnu.org
@ 2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2022-01-05 17:37 ` [Bug fortran/95879] [10/11/12 " sandra at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-08 12:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95879
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.3 |10.4
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10.3 is being released, retargeting bugs to GCC 10.4.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/95879] [10/11/12 Regression] ICE in gfc_resolve_formal_arglist, at fortran/resolve.c:313
2020-06-24 18:49 [Bug fortran/95879] New: [10/11 Regression] ICE in gfc_get_derived_type, at fortran/trans-types.c:2729 gscfq@t-online.de
` (5 preceding siblings ...)
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
@ 2022-01-05 17:37 ` sandra at gcc dot gnu.org
2022-01-05 22:36 ` anlauf at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: sandra at gcc dot gnu.org @ 2022-01-05 17:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95879
sandra at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sandra at gcc dot gnu.org
--- Comment #5 from sandra at gcc dot gnu.org ---
The ICE from the z1.90 example is gone on mainline now. I don't know if the
error on y1.f90 is correct or not without further research.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/95879] [10/11/12 Regression] ICE in gfc_resolve_formal_arglist, at fortran/resolve.c:313
2020-06-24 18:49 [Bug fortran/95879] New: [10/11 Regression] ICE in gfc_get_derived_type, at fortran/trans-types.c:2729 gscfq@t-online.de
` (6 preceding siblings ...)
2022-01-05 17:37 ` [Bug fortran/95879] [10/11/12 " sandra at gcc dot gnu.org
@ 2022-01-05 22:36 ` anlauf at gcc dot gnu.org
2022-06-28 10:41 ` [Bug fortran/95879] [10/11/12/13 " jakub at gcc dot gnu.org
2023-07-07 10:37 ` [Bug fortran/95879] [11/12/13/14 " rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-05 22:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95879
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
--- Comment #6 from anlauf at gcc dot gnu.org ---
(In reply to sandra from comment #5)
> The ICE from the z1.90 example is gone on mainline now. I don't know if the
> error on y1.f90 is correct or not without further research.
y1.f90 is invalid code. However, gfortran's checking looks suspicious to me.
Rewriting the testcase slightly:
module m
implicit none
contains
integer function f(x) bind(c)
use iso_c_binding, only: c_funloc
real, intent(in) :: x
c_funloc(f) = x
f = 0
end
end
This would give:
pr95879-y1.f90:7:13:
7 | c_funloc(f) = x
| 1
Error: Function result 'f' at (1) is invalid as X argument to C_FUNLOC
I think this is wrong.
F2018: 18.2.3.5 C_FUNLOC (X)
Argument. X shall be a procedure; if it is a procedure pointer it shall be
associated. It shall not be a coindexed object.
Deactivating the related check in gfc_check_c_funloc, I get:
pr95879-y1.f90:7:4:
7 | c_funloc(f) = x
| 1
Error: The function result on the lhs of the assignment at (1) must have the
pointer attribute.
That looks like a more reasonable error.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/95879] [10/11/12/13 Regression] ICE in gfc_resolve_formal_arglist, at fortran/resolve.c:313
2020-06-24 18:49 [Bug fortran/95879] New: [10/11 Regression] ICE in gfc_get_derived_type, at fortran/trans-types.c:2729 gscfq@t-online.de
` (7 preceding siblings ...)
2022-01-05 22:36 ` anlauf at gcc dot gnu.org
@ 2022-06-28 10:41 ` jakub at gcc dot gnu.org
2023-07-07 10:37 ` [Bug fortran/95879] [11/12/13/14 " rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95879
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.4 |10.5
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/95879] [11/12/13/14 Regression] ICE in gfc_resolve_formal_arglist, at fortran/resolve.c:313
2020-06-24 18:49 [Bug fortran/95879] New: [10/11 Regression] ICE in gfc_get_derived_type, at fortran/trans-types.c:2729 gscfq@t-online.de
` (8 preceding siblings ...)
2022-06-28 10:41 ` [Bug fortran/95879] [10/11/12/13 " jakub at gcc dot gnu.org
@ 2023-07-07 10:37 ` rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95879
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.5 |11.5
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-07-07 10:37 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-24 18:49 [Bug fortran/95879] New: [10/11 Regression] ICE in gfc_get_derived_type, at fortran/trans-types.c:2729 gscfq@t-online.de
2020-06-24 18:50 ` [Bug fortran/95879] " gscfq@t-online.de
2020-06-25 7:10 ` [Bug fortran/95879] [10/11 Regression] ICE in gfc_resolve_formal_arglist, at fortran/resolve.c:313 marxin at gcc dot gnu.org
2020-06-25 7:35 ` rguenth at gcc dot gnu.org
2020-07-23 6:51 ` rguenth at gcc dot gnu.org
2020-10-12 12:51 ` rguenth at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2022-01-05 17:37 ` [Bug fortran/95879] [10/11/12 " sandra at gcc dot gnu.org
2022-01-05 22:36 ` anlauf at gcc dot gnu.org
2022-06-28 10:41 ` [Bug fortran/95879] [10/11/12/13 " jakub at gcc dot gnu.org
2023-07-07 10:37 ` [Bug fortran/95879] [11/12/13/14 " rguenth 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).