public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/98279] New: ICE in apply_scale with --param=hot-bb-frequency-fraction >= 2^31
@ 2020-12-14 14:50 acoplan at gcc dot gnu.org
2020-12-14 14:55 ` [Bug tree-optimization/98279] " ktkachov at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: acoplan at gcc dot gnu.org @ 2020-12-14 14:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98279
Bug ID: 98279
Summary: ICE in apply_scale with
--param=hot-bb-frequency-fraction >= 2^31
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: acoplan at gcc dot gnu.org
Target Milestone: ---
The following fails:
$ cat test.c
int a() {}
$ aarch64-elf-gcc test.c -c -O --param=hot-bb-frequency-fraction=2147483648
during GIMPLE pass: cdce
test.c: In function 'a':
test.c:1:5: internal compiler error: in apply_scale, at profile-count.h:1082
1 | int a() {}
| ^
0xcf2c8d profile_count::apply_scale(long, long) const
/home/alecop01/toolchain/src/gcc/gcc/profile-count.h:1082
0xce6ed7 maybe_hot_count_p(function*, profile_count)
/home/alecop01/toolchain/src/gcc/gcc/predict.c:175
0xce7459 maybe_hot_bb_p(function*, basic_block_def const*)
/home/alecop01/toolchain/src/gcc/gcc/predict.c:193
0xce76c1 optimize_bb_for_size_p(basic_block_def const*)
/home/alecop01/toolchain/src/gcc/gcc/predict.c:301
0xe11269 execute
/home/alecop01/toolchain/src/gcc/gcc/tree-call-cdce.c:1195
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Related to PR98271 and PR98276 (both ICEs that occur when a --param is >=
2^31). Perhaps a meta-bug would be useful here?
Equally, perhaps I'm misunderstanding the contract for --param values: are
these meant to be user-facing or internal? I.e. is it expected that the
compiler ICEs if the user provides an unreasonable value for the param?
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/98279] ICE in apply_scale with --param=hot-bb-frequency-fraction >= 2^31
2020-12-14 14:50 [Bug tree-optimization/98279] New: ICE in apply_scale with --param=hot-bb-frequency-fraction >= 2^31 acoplan at gcc dot gnu.org
@ 2020-12-14 14:55 ` ktkachov at gcc dot gnu.org
2020-12-14 16:36 ` marxin at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2020-12-14 14:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98279
ktkachov at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ktkachov at gcc dot gnu.org
--- Comment #1 from ktkachov at gcc dot gnu.org ---
(In reply to Alex Coplan from comment #0)
> The following fails:
>
> $ cat test.c
> int a() {}
> $ aarch64-elf-gcc test.c -c -O --param=hot-bb-frequency-fraction=2147483648
> during GIMPLE pass: cdce
> test.c: In function 'a':
> test.c:1:5: internal compiler error: in apply_scale, at profile-count.h:1082
> 1 | int a() {}
> | ^
> 0xcf2c8d profile_count::apply_scale(long, long) const
> /home/alecop01/toolchain/src/gcc/gcc/profile-count.h:1082
> 0xce6ed7 maybe_hot_count_p(function*, profile_count)
> /home/alecop01/toolchain/src/gcc/gcc/predict.c:175
> 0xce7459 maybe_hot_bb_p(function*, basic_block_def const*)
> /home/alecop01/toolchain/src/gcc/gcc/predict.c:193
> 0xce76c1 optimize_bb_for_size_p(basic_block_def const*)
> /home/alecop01/toolchain/src/gcc/gcc/predict.c:301
> 0xe11269 execute
> /home/alecop01/toolchain/src/gcc/gcc/tree-call-cdce.c:1195
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please include the complete backtrace with any bug report.
> See <https://gcc.gnu.org/bugs/> for instructions.
>
> Related to PR98271 and PR98276 (both ICEs that occur when a --param is >=
> 2^31). Perhaps a meta-bug would be useful here?
>
> Equally, perhaps I'm misunderstanding the contract for --param values: are
> these meant to be user-facing or internal? I.e. is it expected that the
> compiler ICEs if the user provides an unreasonable value for the param?
My understanding is the compiler should never ICE, even for developer-oriented
params. The fact that this is an ICE due to an outrageous input to a param
would lower the priority of the bug, but it doesn't invalidate it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/98279] ICE in apply_scale with --param=hot-bb-frequency-fraction >= 2^31
2020-12-14 14:50 [Bug tree-optimization/98279] New: ICE in apply_scale with --param=hot-bb-frequency-fraction >= 2^31 acoplan at gcc dot gnu.org
2020-12-14 14:55 ` [Bug tree-optimization/98279] " ktkachov at gcc dot gnu.org
@ 2020-12-14 16:36 ` marxin at gcc dot gnu.org
2020-12-16 9:21 ` cvs-commit at gcc dot gnu.org
2020-12-16 9:22 ` marxin at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-14 16:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98279
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
CC| |marxin at gcc dot gnu.org
Ever confirmed|0 |1
Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org
Last reconfirmed| |2020-12-14
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Let me fix that.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/98279] ICE in apply_scale with --param=hot-bb-frequency-fraction >= 2^31
2020-12-14 14:50 [Bug tree-optimization/98279] New: ICE in apply_scale with --param=hot-bb-frequency-fraction >= 2^31 acoplan at gcc dot gnu.org
2020-12-14 14:55 ` [Bug tree-optimization/98279] " ktkachov at gcc dot gnu.org
2020-12-14 16:36 ` marxin at gcc dot gnu.org
@ 2020-12-16 9:21 ` cvs-commit at gcc dot gnu.org
2020-12-16 9:22 ` marxin at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-16 9:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98279
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:
https://gcc.gnu.org/g:5c5eb7e4872025e8d5e8ae2f0e568403f7c8803d
commit r11-6111-g5c5eb7e4872025e8d5e8ae2f0e568403f7c8803d
Author: Martin Liska <mliska@suse.cz>
Date: Tue Dec 15 09:57:19 2020 +0100
options: fix integer overflow
gcc/ChangeLog:
PR rtl-optimization/98271
PR rtl-optimization/98276
PR tree-optimization/98279
* opts-common.c (set_option): Do not allow overflow for integer
arguments.
gcc/testsuite/ChangeLog:
PR rtl-optimization/98271
PR rtl-optimization/98276
PR tree-optimization/98279
* gcc.dg/pr98271.c: New test.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/98279] ICE in apply_scale with --param=hot-bb-frequency-fraction >= 2^31
2020-12-14 14:50 [Bug tree-optimization/98279] New: ICE in apply_scale with --param=hot-bb-frequency-fraction >= 2^31 acoplan at gcc dot gnu.org
` (2 preceding siblings ...)
2020-12-16 9:21 ` cvs-commit at gcc dot gnu.org
@ 2020-12-16 9:22 ` marxin at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-16 9:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98279
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-12-16 9:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 14:50 [Bug tree-optimization/98279] New: ICE in apply_scale with --param=hot-bb-frequency-fraction >= 2^31 acoplan at gcc dot gnu.org
2020-12-14 14:55 ` [Bug tree-optimization/98279] " ktkachov at gcc dot gnu.org
2020-12-14 16:36 ` marxin at gcc dot gnu.org
2020-12-16 9:21 ` cvs-commit at gcc dot gnu.org
2020-12-16 9:22 ` marxin 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).