public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/97880] New: [9/10/11 Regression] ICE in emit_library_call_value_1, at calls.c:5298
@ 2020-11-17 17:45 gscfq@t-online.de
2020-11-18 8:19 ` [Bug c/97880] [8/9/10/11 " rguenth at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: gscfq@t-online.de @ 2020-11-17 17:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97880
Bug ID: 97880
Summary: [9/10/11 Regression] ICE in emit_library_call_value_1,
at calls.c:5298
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
With option -ftrapv at -O0, down to version r7 :
$ cat z1.c
void f ()
{
#pragma acc parallel loop tile(2, 3)
for (int i = 0; i < 8; i++)
for (long j = 0; j < 8; j++);
}
$ gcc-6 -c z1.c -fopenacc -ftrapv -O0
$
$ gcc-11-20201115 -c z1.c -fopenacc
$ gcc-11-20201115 -c z1.c -fopenacc -ftrapv -O1
$
$ gcc-11-20201115 -c z1.c -fopenacc -ftrapv -O0
during RTL pass: expand
z1.c: In function 'f._omp_fn.0':
z1.c:3:11: internal compiler error: in emit_library_call_value_1, at
calls.c:5298
3 | #pragma acc parallel loop tile(2, 3)
| ^~~
0x7304a0 emit_library_call_value_1(int, rtx_def*, rtx_def*, libcall_type,
machine_mode, int, std::pair<rtx_def*, machine_mode>*)
../../gcc/calls.c:5296
0xa3b4c8 emit_library_call_value(rtx_def*, rtx_def*, libcall_type,
machine_mode, rtx_def*, machine_mode, rtx_def*, machine_mode)
../../gcc/rtl.h:4258
0xa3b4c8 expand_binop(machine_mode, optab_tag, rtx_def*, rtx_def*, rtx_def*,
int, optab_methods)
../../gcc/optabs.c:1837
0x83bd01 expand_mult(machine_mode, rtx_def*, rtx_def*, rtx_def*, int, bool)
../../gcc/expmed.c:3571
0x858a04 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
../../gcc/expr.c:9175
0x74af02 expand_gimple_stmt_1
../../gcc/cfgexpand.c:3816
0x74af02 expand_gimple_stmt
../../gcc/cfgexpand.c:3877
0x74fb37 expand_gimple_basic_block
../../gcc/cfgexpand.c:5918
0x75219e execute
../../gcc/cfgexpand.c:6602
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/97880] [8/9/10/11 Regression] ICE in emit_library_call_value_1, at calls.c:5298
2020-11-17 17:45 [Bug c/97880] New: [9/10/11 Regression] ICE in emit_library_call_value_1, at calls.c:5298 gscfq@t-online.de
@ 2020-11-18 8:19 ` rguenth at gcc dot gnu.org
2020-11-18 8:32 ` marxin at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-18 8:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97880
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |openacc
Target Milestone|--- |8.5
Summary|[9/10/11 Regression] ICE in |[8/9/10/11 Regression] ICE
|emit_library_call_value_1, |in
|at calls.c:5298 |emit_library_call_value_1,
| |at calls.c:5298
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/97880] [8/9/10/11 Regression] ICE in emit_library_call_value_1, at calls.c:5298
2020-11-17 17:45 [Bug c/97880] New: [9/10/11 Regression] ICE in emit_library_call_value_1, at calls.c:5298 gscfq@t-online.de
2020-11-18 8:19 ` [Bug c/97880] [8/9/10/11 " rguenth at gcc dot gnu.org
@ 2020-11-18 8:32 ` marxin at gcc dot gnu.org
2020-11-18 17:08 ` burnus at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-18 8:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97880
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2020-11-18
CC| |cesar at codesourcery dot com,
| |marxin at gcc dot gnu.org,
| |nathan at gcc dot gnu.org
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, started with r7-6598-g02889d23ee3b0285.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/97880] [8/9/10/11 Regression] ICE in emit_library_call_value_1, at calls.c:5298
2020-11-17 17:45 [Bug c/97880] New: [9/10/11 Regression] ICE in emit_library_call_value_1, at calls.c:5298 gscfq@t-online.de
2020-11-18 8:19 ` [Bug c/97880] [8/9/10/11 " rguenth at gcc dot gnu.org
2020-11-18 8:32 ` marxin at gcc dot gnu.org
@ 2020-11-18 17:08 ` burnus at gcc dot gnu.org
2020-11-19 9:40 ` [Bug c/97880] [8/9/10/11 Regression] [OpenACC] " burnus at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu.org @ 2020-11-18 17:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97880
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
With trunk, I get for
for (int i = 0; i < 8; i++)
for (long j = 0; j < 8; j++);
foocc.c: In function ‘f._omp_fn.0’:
foocc.c:6:1: error: type mismatch in binary expression
6 | }
| ^
signed long
long int
int
D.2125 = .tile.5 * .tile.7;
during IPA pass: *free_lang_data
Draft patch:
--- a/gcc/omp-expand.c
+++ b/gcc/omp-expand.c
@@ -7561 +7561,2 @@ expand_oacc_for (struct omp_region *region, struct
omp_for_data *fd)
- expr = fold_build2 (MULT_EXPR, diff_type, counts[ix].tile, expr);
+ expr = fold_build2 (MULT_EXPR, diff_type,
+ fold_convert (diff_type, counts[ix].tile), expr);
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/97880] [8/9/10/11 Regression] [OpenACC] ICE in emit_library_call_value_1, at calls.c:5298
2020-11-17 17:45 [Bug c/97880] New: [9/10/11 Regression] ICE in emit_library_call_value_1, at calls.c:5298 gscfq@t-online.de
` (2 preceding siblings ...)
2020-11-18 17:08 ` burnus at gcc dot gnu.org
@ 2020-11-19 9:40 ` burnus at gcc dot gnu.org
2020-11-27 10:21 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu.org @ 2020-11-19 9:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97880
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[8/9/10/11 Regression] ICE |[8/9/10/11 Regression]
|in |[OpenACC] ICE in
|emit_library_call_value_1, |emit_library_call_value_1,
|at calls.c:5298 |at calls.c:5298
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #2)
> +++ b/gcc/omp-expand.c
> @@ -7561 +7561,2 @@ expand_oacc_for (struct omp_region *region, struct
I think my draft patch is not quite right:
expand_oacc_for (struct omp_region *region, struct omp_for_data *fd)
has:
tree iter_type = TREE_TYPE (v);
tree diff_type = iter_type;
and
if (fd->collapse > 1 || fd->tiling)
tree total = expand_oacc_collapse_init (fd, &gsi, counts,
TREE_TYPE (fd->loop.n2), loc);
The called expand_oacc_collapse_init also extracts the types.
as does expand_oacc_collapse_vars .
At least for some of those loop *_type, the largest TYPE_PRECISION has to be
used.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/97880] [8/9/10/11 Regression] [OpenACC] ICE in emit_library_call_value_1, at calls.c:5298
2020-11-17 17:45 [Bug c/97880] New: [9/10/11 Regression] ICE in emit_library_call_value_1, at calls.c:5298 gscfq@t-online.de
` (3 preceding siblings ...)
2020-11-19 9:40 ` [Bug c/97880] [8/9/10/11 Regression] [OpenACC] " burnus at gcc dot gnu.org
@ 2020-11-27 10:21 ` cvs-commit at gcc dot gnu.org
2021-01-14 9:40 ` [Bug c/97880] [8/9/10 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-27 10:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97880
--- 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:f324479caf0ac326534f4fcf72cb12991ccddb3d
commit r11-5489-gf324479caf0ac326534f4fcf72cb12991ccddb3d
Author: Tobias Burnus <tobias@codesourcery.com>
Date: Fri Nov 27 11:17:50 2020 +0100
OpenACC: Fix integer-type issue with collapse/tile [PR97880]
gcc/ChangeLog:
PR c/97880
* omp-expand.c (expand_oacc_collapse_init,
expand_oacc_collapse_vars):
Use now passed diff_type.
(expand_oacc_for): Take largest type for diff_type, taking tiling
and collapsing into account.
gcc/testsuite/ChangeLog:
PR c/97880
* gcc.dg/goacc/tile-1.c: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/97880] [8/9/10 Regression] [OpenACC] ICE in emit_library_call_value_1, at calls.c:5298
2020-11-17 17:45 [Bug c/97880] New: [9/10/11 Regression] ICE in emit_library_call_value_1, at calls.c:5298 gscfq@t-online.de
` (4 preceding siblings ...)
2020-11-27 10:21 ` cvs-commit at gcc dot gnu.org
@ 2021-01-14 9:40 ` rguenth at gcc dot gnu.org
2021-04-19 10:37 ` cvs-commit at gcc dot gnu.org
2021-04-19 10:43 ` burnus at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-14 9:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97880
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |11.0
Summary|[8/9/10/11 Regression] |[8/9/10 Regression]
|[OpenACC] ICE in |[OpenACC] ICE in
|emit_library_call_value_1, |emit_library_call_value_1,
|at calls.c:5298 |at calls.c:5298
Priority|P3 |P2
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk I assume.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/97880] [8/9/10 Regression] [OpenACC] ICE in emit_library_call_value_1, at calls.c:5298
2020-11-17 17:45 [Bug c/97880] New: [9/10/11 Regression] ICE in emit_library_call_value_1, at calls.c:5298 gscfq@t-online.de
` (5 preceding siblings ...)
2021-01-14 9:40 ` [Bug c/97880] [8/9/10 " rguenth at gcc dot gnu.org
@ 2021-04-19 10:37 ` cvs-commit at gcc dot gnu.org
2021-04-19 10:43 ` burnus at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-19 10:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97880
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Tobias Burnus
<burnus@gcc.gnu.org>:
https://gcc.gnu.org/g:af408874e3d94492ac08ba17462b3ff8ecb4d791
commit r10-9716-gaf408874e3d94492ac08ba17462b3ff8ecb4d791
Author: Tobias Burnus <tobias@codesourcery.com>
Date: Fri Nov 27 11:17:50 2020 +0100
OpenACC: Fix integer-type issue with collapse/tile [PR97880]
gcc/ChangeLog:
PR c/97880
* omp-expand.c (expand_oacc_collapse_init,
expand_oacc_collapse_vars):
Use now passed diff_type.
(expand_oacc_for): Take largest type for diff_type, taking tiling
and collapsing into account.
gcc/testsuite/ChangeLog:
PR c/97880
* gcc.dg/goacc/tile-1.c: New test.
(cherry picked from commit f324479caf0ac326534f4fcf72cb12991ccddb3d)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/97880] [8/9/10 Regression] [OpenACC] ICE in emit_library_call_value_1, at calls.c:5298
2020-11-17 17:45 [Bug c/97880] New: [9/10/11 Regression] ICE in emit_library_call_value_1, at calls.c:5298 gscfq@t-online.de
` (6 preceding siblings ...)
2021-04-19 10:37 ` cvs-commit at gcc dot gnu.org
@ 2021-04-19 10:43 ` burnus at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-04-19 10:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97880
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> ---
FIXED on GCC 11 (mainline) and GCC 10. (Cf. related also PR98088, fixed for the
same branches.)
I do not intent to backport it to GCC 8 or 9. Hence, close as FIXED
Thanks for this and the other reports!
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-04-19 10:43 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17 17:45 [Bug c/97880] New: [9/10/11 Regression] ICE in emit_library_call_value_1, at calls.c:5298 gscfq@t-online.de
2020-11-18 8:19 ` [Bug c/97880] [8/9/10/11 " rguenth at gcc dot gnu.org
2020-11-18 8:32 ` marxin at gcc dot gnu.org
2020-11-18 17:08 ` burnus at gcc dot gnu.org
2020-11-19 9:40 ` [Bug c/97880] [8/9/10/11 Regression] [OpenACC] " burnus at gcc dot gnu.org
2020-11-27 10:21 ` cvs-commit at gcc dot gnu.org
2021-01-14 9:40 ` [Bug c/97880] [8/9/10 " rguenth at gcc dot gnu.org
2021-04-19 10:37 ` cvs-commit at gcc dot gnu.org
2021-04-19 10:43 ` 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).