public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/108546] New: [11/12/13 Regression] ICE in expand_expr_real_1, at expr.cc:10910
@ 2023-01-25 17:52 gscfq@t-online.de
2023-01-26 7:44 ` [Bug fortran/108546] " rguenth at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: gscfq@t-online.de @ 2023-01-25 17:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108546
Bug ID: 108546
Summary: [11/12/13 Regression] ICE in expand_expr_real_1, at
expr.cc:10910
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Started with r10, between 20191110 and 20191117 :
$ cat z1.f90
module m
use iso_c_binding
contains
subroutine s(x)
type(c_ptr), optional :: x
!$omp target is_device_ptr(x)
if (c_associated(x)) stop
!$omp end target
end
end
$ cat z2.f90 # compiles, for reference only
module m
use iso_c_binding
contains
subroutine s(x)
type(c_ptr) :: x
!$omp target is_device_ptr(x)
if (c_associated(x)) stop
!$omp end target
end
end
$ gfortran-13-20230122 -c z2.f90 -fopenmp
$ gfortran-10-20191110 -c z1.f90 -fopenmp
$
$ gfortran-13-20230122 -c z1.f90 -fopenmp
during RTL pass: expand
z1.f90:6:35:
6 | !$omp target is_device_ptr(x)
| ^
internal compiler error: in expand_expr_real_1, at expr.cc:10910
0xa570bf expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
../../gcc/expr.cc:10904
0xa5e66e expand_expr
../../gcc/expr.h:310
0xa5e66e expand_operands(tree_node*, tree_node*, rtx_def*, rtx_def**,
rtx_def**, expand_modifier)
../../gcc/expr.cc:8582
0xa6a23a do_store_flag
../../gcc/expr.cc:13113
0xa6574e expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
../../gcc/expr.cc:10259
0x94fba2 expand_gimple_stmt_1
../../gcc/cfgexpand.cc:3983
0x94fba2 expand_gimple_stmt
../../gcc/cfgexpand.cc:4044
0x9548d7 expand_gimple_basic_block
../../gcc/cfgexpand.cc:6096
0x95739e execute
../../gcc/cfgexpand.cc:6831
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/108546] [11/12/13 Regression] ICE in expand_expr_real_1, at expr.cc:10910
2023-01-25 17:52 [Bug fortran/108546] New: [11/12/13 Regression] ICE in expand_expr_real_1, at expr.cc:10910 gscfq@t-online.de
@ 2023-01-26 7:44 ` rguenth at gcc dot gnu.org
2023-01-26 9:43 ` [Bug fortran/108546] [11/12/13 Regression] ICE in expand_expr_real_1, at expr.cc:10910 since r10-4531-ga2c26c50310a3363 marxin at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-01-26 7:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108546
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/108546] [11/12/13 Regression] ICE in expand_expr_real_1, at expr.cc:10910 since r10-4531-ga2c26c50310a3363
2023-01-25 17:52 [Bug fortran/108546] New: [11/12/13 Regression] ICE in expand_expr_real_1, at expr.cc:10910 gscfq@t-online.de
2023-01-26 7:44 ` [Bug fortran/108546] " rguenth at gcc dot gnu.org
@ 2023-01-26 9:43 ` marxin at gcc dot gnu.org
2023-02-21 12:56 ` [Bug middle-end/108546] " rguenth at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2023-01-26 9:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108546
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[11/12/13 Regression] ICE |[11/12/13 Regression] ICE
|in expand_expr_real_1, at |in expand_expr_real_1, at
|expr.cc:10910 |expr.cc:10910 since
| |r10-4531-ga2c26c50310a3363
Ever confirmed|0 |1
Last reconfirmed| |2023-01-26
Status|UNCONFIRMED |NEW
CC| |grosser at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r10-4531-ga2c26c50310a3363.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/108546] [11/12/13 Regression] ICE in expand_expr_real_1, at expr.cc:10910 since r10-4531-ga2c26c50310a3363
2023-01-25 17:52 [Bug fortran/108546] New: [11/12/13 Regression] ICE in expand_expr_real_1, at expr.cc:10910 gscfq@t-online.de
2023-01-26 7:44 ` [Bug fortran/108546] " rguenth at gcc dot gnu.org
2023-01-26 9:43 ` [Bug fortran/108546] [11/12/13 Regression] ICE in expand_expr_real_1, at expr.cc:10910 since r10-4531-ga2c26c50310a3363 marxin at gcc dot gnu.org
@ 2023-02-21 12:56 ` rguenth at gcc dot gnu.org
2023-03-01 12:53 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-02-21 12:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108546
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|fortran |middle-end
Priority|P3 |P2
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
(gdb) p exp
$1 = <parm_decl 0x7ffff7ff3280 x>
(gdb) p context
$2 = <function_decl 0x7ffff6460f00 s>
(gdb) p current_function_decl
$3 = <function_decl 0x7ffff6065200 __m_MOD_s._omp_fn.0>
so we somehow forgot to remap 's'? Looks like a middle-end issue to me.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/108546] [11/12/13 Regression] ICE in expand_expr_real_1, at expr.cc:10910 since r10-4531-ga2c26c50310a3363
2023-01-25 17:52 [Bug fortran/108546] New: [11/12/13 Regression] ICE in expand_expr_real_1, at expr.cc:10910 gscfq@t-online.de
` (2 preceding siblings ...)
2023-02-21 12:56 ` [Bug middle-end/108546] " rguenth at gcc dot gnu.org
@ 2023-03-01 12:53 ` cvs-commit at gcc dot gnu.org
2023-03-08 10:55 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-01 12:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108546
--- Comment #3 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:96ff97ff6574666a5509ae9fa596e7f2b6ad4f88
commit r13-6390-g96ff97ff6574666a5509ae9fa596e7f2b6ad4f88
Author: Tobias Burnus <tobias@codesourcery.com>
Date: Wed Mar 1 13:53:09 2023 +0100
OpenMP/Fortran: Fix handling of optional is_device_ptr + bind(C) [PR108546]
For is_device_ptr, optional checks should only be done before calling
libgomp, afterwards they are NULL either because of absent or, by
chance, because it is unallocated or unassociated (for
pointers/allocatables).
Additionally, it fixes an issue with explicit mapping for 'type(c_ptr)'.
PR middle-end/108546
gcc/fortran/ChangeLog:
* trans-openmp.cc (gfc_trans_omp_clauses): Fix mapping of
type(C_ptr) variables.
gcc/ChangeLog:
* omp-low.cc (lower_omp_target): Remove optional handling
on the receiver side, i.e. inside target (data), for
use_device_ptr.
libgomp/ChangeLog:
* testsuite/libgomp.fortran/is_device_ptr-3.f90: New test.
* testsuite/libgomp.fortran/use_device_ptr-optional-4.f90: New
test.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/108546] [11/12/13 Regression] ICE in expand_expr_real_1, at expr.cc:10910 since r10-4531-ga2c26c50310a3363
2023-01-25 17:52 [Bug fortran/108546] New: [11/12/13 Regression] ICE in expand_expr_real_1, at expr.cc:10910 gscfq@t-online.de
` (3 preceding siblings ...)
2023-03-01 12:53 ` cvs-commit at gcc dot gnu.org
@ 2023-03-08 10:55 ` cvs-commit at gcc dot gnu.org
2023-03-09 11:10 ` cvs-commit at gcc dot gnu.org
2023-03-09 11:11 ` burnus at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-08 10:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108546
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Tobias Burnus
<burnus@gcc.gnu.org>:
https://gcc.gnu.org/g:fa1e458d05a94d064e8daef88c2be300317d7e8b
commit r12-9235-gfa1e458d05a94d064e8daef88c2be300317d7e8b
Author: Tobias Burnus <tobias@codesourcery.com>
Date: Wed Mar 1 13:53:09 2023 +0100
OpenMP/Fortran: Fix handling of optional is_device_ptr + bind(C) [PR108546]
For is_device_ptr, optional checks should only be done before calling
libgomp, afterwards they are NULL either because of absent or, by
chance, because it is unallocated or unassociated (for
pointers/allocatables).
Additionally, it fixes an issue with explicit mapping for 'type(c_ptr)'.
PR middle-end/108546
gcc/fortran/ChangeLog:
* trans-openmp.cc (gfc_trans_omp_clauses): Fix mapping of
type(C_ptr) variables.
gcc/ChangeLog:
* omp-low.cc (lower_omp_target): Remove optional handling
on the receiver side, i.e. inside target (data), for
use_device_ptr.
libgomp/ChangeLog:
* testsuite/libgomp.fortran/is_device_ptr-3.f90: New test.
* testsuite/libgomp.fortran/use_device_ptr-optional-4.f90: New
test.
(cherry picked from commit 96ff97ff6574666a5509ae9fa596e7f2b6ad4f88)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/108546] [11/12/13 Regression] ICE in expand_expr_real_1, at expr.cc:10910 since r10-4531-ga2c26c50310a3363
2023-01-25 17:52 [Bug fortran/108546] New: [11/12/13 Regression] ICE in expand_expr_real_1, at expr.cc:10910 gscfq@t-online.de
` (4 preceding siblings ...)
2023-03-08 10:55 ` cvs-commit at gcc dot gnu.org
@ 2023-03-09 11:10 ` cvs-commit at gcc dot gnu.org
2023-03-09 11:11 ` burnus at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-09 11:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108546
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Tobias Burnus
<burnus@gcc.gnu.org>:
https://gcc.gnu.org/g:e7d995cf9bff2ca4a54b94c4a38455ebd1c2883e
commit r11-10565-ge7d995cf9bff2ca4a54b94c4a38455ebd1c2883e
Author: Tobias Burnus <tobias@codesourcery.com>
Date: Wed Mar 1 13:53:09 2023 +0100
OpenMP/Fortran: Fix handling of optional is_device_ptr + bind(C) [PR108546]
For is_device_ptr, optional checks should only be done before calling
libgomp, afterwards they are NULL either because of absent or, by
chance, because it is unallocated or unassociated (for
pointers/allocatables).
Additionally, it fixes an issue with explicit mapping for 'type(c_ptr)'.
PR middle-end/108546
gcc/fortran/ChangeLog:
* trans-openmp.c (gfc_trans_omp_clauses): Fix mapping of
type(C_ptr) variables.
gcc/ChangeLog:
* omp-low.c (lower_omp_target): Remove optional handling
on the receiver side, i.e. inside target (data), for
use_device_ptr.
libgomp/ChangeLog:
* testsuite/libgomp.fortran/is_device_ptr-3.f90: New test.
* testsuite/libgomp.fortran/use_device_ptr-optional-4.f90: New
test.
(cherry picked from commit 96ff97ff6574666a5509ae9fa596e7f2b6ad4f88)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/108546] [11/12/13 Regression] ICE in expand_expr_real_1, at expr.cc:10910 since r10-4531-ga2c26c50310a3363
2023-01-25 17:52 [Bug fortran/108546] New: [11/12/13 Regression] ICE in expand_expr_real_1, at expr.cc:10910 gscfq@t-online.de
` (5 preceding siblings ...)
2023-03-09 11:10 ` cvs-commit at gcc dot gnu.org
@ 2023-03-09 11:11 ` burnus at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2023-03-09 11:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108546
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
CC| |burnus at gcc dot gnu.org
--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> ---
FIXED on GCC 11/12/mainline(= GCC 13).
Thanks for this bugreport (and may others).
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-03-09 11:11 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-25 17:52 [Bug fortran/108546] New: [11/12/13 Regression] ICE in expand_expr_real_1, at expr.cc:10910 gscfq@t-online.de
2023-01-26 7:44 ` [Bug fortran/108546] " rguenth at gcc dot gnu.org
2023-01-26 9:43 ` [Bug fortran/108546] [11/12/13 Regression] ICE in expand_expr_real_1, at expr.cc:10910 since r10-4531-ga2c26c50310a3363 marxin at gcc dot gnu.org
2023-02-21 12:56 ` [Bug middle-end/108546] " rguenth at gcc dot gnu.org
2023-03-01 12:53 ` cvs-commit at gcc dot gnu.org
2023-03-08 10:55 ` cvs-commit at gcc dot gnu.org
2023-03-09 11:10 ` cvs-commit at gcc dot gnu.org
2023-03-09 11:11 ` 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).