public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/102885] New: [12 Regression] ICE when compiling gfortran.dg/bind_c_char_10.f90 with -flto
@ 2021-10-21 16:44 dominiq at lps dot ens.fr
2021-10-22 6:23 ` [Bug fortran/102885] " rguenth at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: dominiq at lps dot ens.fr @ 2021-10-21 16:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102885
Bug ID: 102885
Summary: [12 Regression] ICE when compiling
gfortran.dg/bind_c_char_10.f90 with -flto
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: dominiq at lps dot ens.fr
CC: burnus at gcc dot gnu.org, hubicka at gcc dot gnu.org,
iains at gcc dot gnu.org, sandra at gcc dot gnu.org
Target Milestone: ---
The test gfortran.dg/bind_c_char_10.f90 ICE when compiled with -flto:
lto1: internal compiler error: Segmentation fault: 11
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
lto-wrapper: fatal error: gfc returned 1 exit status
compilation terminated.
collect2: fatal error: lto-wrapper returned 1 exit status
compilation terminated.
Reduced test:
module m
use iso_c_binding, only: c_char
implicit none (type, external)
contains
! Assumed-shape array, nonallocatable/nonpointer
subroutine ar3 (xn, n) bind(C)
integer :: n
character(len=n) :: xn(..)
if (size(xn) /= 6) stop
if (len(xn) /= 5) stop
select rank(xn)
rank(1)
xn = ['FDGhf', &
'hdrhg', &
'fDgFl', &
'DFHs3', &
'4a54G', &
'hSs6k']
rank default
stop
end select
end
end
program main
use m
implicit none (type, external)
character(kind=c_char, len=5) :: str5a6(6)
! assumed rank - with array descriptor
str5a6 = ['DDGhf', &
'hdrh$', &
'fDGSl', &
'DFHs3', &
'43grG', &
'hFG$k']
call ar3 (str5a6, 5)
end
All the other tests compile with -flto.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/102885] [12 Regression] ICE when compiling gfortran.dg/bind_c_char_10.f90 with -flto
2021-10-21 16:44 [Bug fortran/102885] New: [12 Regression] ICE when compiling gfortran.dg/bind_c_char_10.f90 with -flto dominiq at lps dot ens.fr
@ 2021-10-22 6:23 ` rguenth at gcc dot gnu.org
2021-10-22 8:42 ` [Bug fortran/102885] [12 Regression] ICE when compiling gfortran.dg/bind_c_char_10.f90 with -flto since r12-4467-g64f9623765da3306 marxin at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-22 6:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102885
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |11.2.1
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-10-22
Target Milestone|--- |12.0
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
We've streamed an SSA name in the BLOCK part of a function - that's very likely
a missing DECL_EXPR and thus a SSA name in TYPE_SIZE or so.
We may want to add IL verification for this to catch this earlier.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/102885] [12 Regression] ICE when compiling gfortran.dg/bind_c_char_10.f90 with -flto since r12-4467-g64f9623765da3306
2021-10-21 16:44 [Bug fortran/102885] New: [12 Regression] ICE when compiling gfortran.dg/bind_c_char_10.f90 with -flto dominiq at lps dot ens.fr
2021-10-22 6:23 ` [Bug fortran/102885] " rguenth at gcc dot gnu.org
@ 2021-10-22 8:42 ` marxin at gcc dot gnu.org
2021-10-26 8:19 ` burnus at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-22 8:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102885
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
Summary|[12 Regression] ICE when |[12 Regression] ICE when
|compiling |compiling
|gfortran.dg/bind_c_char_10. |gfortran.dg/bind_c_char_10.
|f90 with -flto |f90 with -flto since
| |r12-4467-g64f9623765da3306
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-4467-g64f9623765da3306.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/102885] [12 Regression] ICE when compiling gfortran.dg/bind_c_char_10.f90 with -flto since r12-4467-g64f9623765da3306
2021-10-21 16:44 [Bug fortran/102885] New: [12 Regression] ICE when compiling gfortran.dg/bind_c_char_10.f90 with -flto dominiq at lps dot ens.fr
2021-10-22 6:23 ` [Bug fortran/102885] " rguenth at gcc dot gnu.org
2021-10-22 8:42 ` [Bug fortran/102885] [12 Regression] ICE when compiling gfortran.dg/bind_c_char_10.f90 with -flto since r12-4467-g64f9623765da3306 marxin at gcc dot gnu.org
@ 2021-10-26 8:19 ` burnus at gcc dot gnu.org
2021-10-26 8:56 ` cvs-commit at gcc dot gnu.org
2021-10-26 9:05 ` burnus at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-10-26 8:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102885
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Further reduced testcase:
module m
use iso_c_binding, only: c_char, c_size_t
implicit none (type, external)
contains
subroutine ar3 (xn, n) bind(C)
integer(c_size_t), intent(in) :: n
character(len=n) :: xn(..)
select rank(xn)
rank(1)
xn(1:1) = ['FDGhf']
end select
end
end
Works if I add "VALUE :: n", i.e. 'n' is passed by value instead of by
reference.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/102885] [12 Regression] ICE when compiling gfortran.dg/bind_c_char_10.f90 with -flto since r12-4467-g64f9623765da3306
2021-10-21 16:44 [Bug fortran/102885] New: [12 Regression] ICE when compiling gfortran.dg/bind_c_char_10.f90 with -flto dominiq at lps dot ens.fr
` (2 preceding siblings ...)
2021-10-26 8:19 ` burnus at gcc dot gnu.org
@ 2021-10-26 8:56 ` cvs-commit at gcc dot gnu.org
2021-10-26 9:05 ` burnus at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-26 8:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102885
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <burnus@gcc.gnu.org>:
https://gcc.gnu.org/g:a31a3d0421f0cf1f7eefacfec8cbf37e7f91600d
commit r12-4703-ga31a3d0421f0cf1f7eefacfec8cbf37e7f91600d
Author: Tobias Burnus <tobias@codesourcery.com>
Date: Tue Oct 26 10:53:53 2021 +0200
Fortran: Fix character(len=cst) dummies with bind(C) [PR102885]
PR fortran/102885
gcc/fortran/ChangeLog:
* trans-decl.c (gfc_conv_cfi_to_gfc): Properly handle nonconstant
character lenghts.
gcc/testsuite/ChangeLog:
* gfortran.dg/lto/bind-c-char_0.f90: New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/102885] [12 Regression] ICE when compiling gfortran.dg/bind_c_char_10.f90 with -flto since r12-4467-g64f9623765da3306
2021-10-21 16:44 [Bug fortran/102885] New: [12 Regression] ICE when compiling gfortran.dg/bind_c_char_10.f90 with -flto dominiq at lps dot ens.fr
` (3 preceding siblings ...)
2021-10-26 8:56 ` cvs-commit at gcc dot gnu.org
@ 2021-10-26 9:05 ` burnus at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-10-26 9:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102885
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> ---
FIXED – thanks all for the report and the help!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-10-26 9:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21 16:44 [Bug fortran/102885] New: [12 Regression] ICE when compiling gfortran.dg/bind_c_char_10.f90 with -flto dominiq at lps dot ens.fr
2021-10-22 6:23 ` [Bug fortran/102885] " rguenth at gcc dot gnu.org
2021-10-22 8:42 ` [Bug fortran/102885] [12 Regression] ICE when compiling gfortran.dg/bind_c_char_10.f90 with -flto since r12-4467-g64f9623765da3306 marxin at gcc dot gnu.org
2021-10-26 8:19 ` burnus at gcc dot gnu.org
2021-10-26 8:56 ` cvs-commit at gcc dot gnu.org
2021-10-26 9:05 ` burnus 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).