public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/106460] New: internal compiler error: output_operand: invalid expression as operand on -O1
@ 2022-07-28 5:42 guojiufu at gcc dot gnu.org
2022-07-28 5:53 ` [Bug target/106460] " guojiufu at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: guojiufu at gcc dot gnu.org @ 2022-07-28 5:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106460
Bug ID: 106460
Summary: internal compiler error: output_operand: invalid
expression as operand on -O1
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: guojiufu at gcc dot gnu.org
Target Milestone: ---
For code:
extern short var_48;
void
foo (double *r)
{
if (var_48)
*r = 1234.5678;
}
On gcc trunk, using the below command, an ICE is raised:
> gcc -mcpu=power10 -O1 t.c
t.c:22:1: internal compiler error: output_operand: invalid expression as
operand
22 | }
| ^
0x10bdb24b output_operand_lossage(char const*, ...)
/home/guojiufu/gcc/gcc-mainline-base/gcc/final.cc:3234
0x10bdd2b7 output_addr_const(_IO_FILE*, rtx_def*)
/home/guojiufu/gcc/gcc-mainline-base/gcc/final.cc:3831
0x11a64e57 assemble_integer_with_op(char const*, rtx_def*)
/home/guojiufu/gcc/gcc-mainline-base/gcc/varasm.cc:2866
0x11a64f67 default_assemble_integer(rtx_def*, unsigned int, int)
/home/guojiufu/gcc/gcc-mainline-base/gcc/varasm.cc:2882
0x11b0343f rs6000_assemble_integer
/home/guojiufu/gcc/gcc-mainline-base/gcc/config/rs6000/rs6000.cc:14420
0x11a65063 assemble_integer(rtx_def*, unsigned int, unsigned int, int)
/home/guojiufu/gcc/gcc-mainline-base/gcc/varasm.cc:2898
0x11a6b727 output_constant_pool_2
/home/guojiufu/gcc/gcc-mainline-base/gcc/varasm.cc:4074
0x11a6c20b output_constant_pool_1
/home/guojiufu/gcc/gcc-mainline-base/gcc/varasm.cc:4191
0x11a6cd87 output_constant_pool_contents
/home/guojiufu/gcc/gcc-mainline-base/gcc/varasm.cc:4348
0x11a6d95b output_shared_constant_pool()
/home/guojiufu/gcc/gcc-mainline-base/gcc/varasm.cc:4546
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/106460] internal compiler error: output_operand: invalid expression as operand on -O1
2022-07-28 5:42 [Bug rtl-optimization/106460] New: internal compiler error: output_operand: invalid expression as operand on -O1 guojiufu at gcc dot gnu.org
@ 2022-07-28 5:53 ` guojiufu at gcc dot gnu.org
2022-10-26 3:23 ` cvs-commit at gcc dot gnu.org
2023-07-19 2:59 ` guojiufu at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: guojiufu at gcc dot gnu.org @ 2022-07-28 5:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106460
--- Comment #1 from Jiu Fu Guo <guojiufu at gcc dot gnu.org> ---
The ice occur when output rtx "(high:DI (symbol_ref:DI ("var_48")..))) to
constant pool.
This rtx is generated at function "recog_for_combine"(in combine.cc) after
invoking "force_const_mem".
This kind of rtx represents the high part of a symbol_ref/address when passed
as an argument to "cannot_force_const_mem". Actually, this kind of rtx can not
be put into a constant pool.
So "cannot_force_const_mem" should return 'true' for them.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/106460] internal compiler error: output_operand: invalid expression as operand on -O1
2022-07-28 5:42 [Bug rtl-optimization/106460] New: internal compiler error: output_operand: invalid expression as operand on -O1 guojiufu at gcc dot gnu.org
2022-07-28 5:53 ` [Bug target/106460] " guojiufu at gcc dot gnu.org
@ 2022-10-26 3:23 ` cvs-commit at gcc dot gnu.org
2023-07-19 2:59 ` guojiufu at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-10-26 3:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106460
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jiu Fu Guo <guojiufu@gcc.gnu.org>:
https://gcc.gnu.org/g:978ec4825c2e5cb0ec03d857ea038440d566ff42
commit r13-3499-g978ec4825c2e5cb0ec03d857ea038440d566ff42
Author: Jiufu Guo <guojiufu@linux.ibm.com>
Date: Tue Jul 19 18:30:58 2022 +0800
rs6000: cannot_force_const_mem for HIGH code rtx[PR106460]
As the issue in PR106460, a rtx 'high:DI (symbol_ref:DI ("var_48")' is
tried
to store into constant pool and ICE occur. But actually, this rtx
represents
partial incomplete address and can not be put into a .rodata section.
This patch updates rs6000_cannot_force_const_mem to return true for rtx(s)
with
HIGH code, because these rtx(s) indicate part of address and are not ok for
constant pool.
Below are some examples:
(high:DI (const:DI (plus:DI (symbol_ref:DI ("xx") (const_int 12 [0xc])))))
(high:DI (symbol_ref:DI ("var_1")..)))
PR target/106460
gcc/ChangeLog:
* config/rs6000/rs6000.cc (rs6000_cannot_force_const_mem): Return
true
for HIGH code rtx.
gcc/testsuite/ChangeLog:
* gcc.target/powerpc/pr106460.c: New test.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/106460] internal compiler error: output_operand: invalid expression as operand on -O1
2022-07-28 5:42 [Bug rtl-optimization/106460] New: internal compiler error: output_operand: invalid expression as operand on -O1 guojiufu at gcc dot gnu.org
2022-07-28 5:53 ` [Bug target/106460] " guojiufu at gcc dot gnu.org
2022-10-26 3:23 ` cvs-commit at gcc dot gnu.org
@ 2023-07-19 2:59 ` guojiufu at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: guojiufu at gcc dot gnu.org @ 2023-07-19 2:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106460
Jiu Fu Guo <guojiufu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
--- Comment #3 from Jiu Fu Guo <guojiufu at gcc dot gnu.org> ---
Fixed in trunk.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-07-19 2:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-28 5:42 [Bug rtl-optimization/106460] New: internal compiler error: output_operand: invalid expression as operand on -O1 guojiufu at gcc dot gnu.org
2022-07-28 5:53 ` [Bug target/106460] " guojiufu at gcc dot gnu.org
2022-10-26 3:23 ` cvs-commit at gcc dot gnu.org
2023-07-19 2:59 ` guojiufu 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).