public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/105936] New: internal compiler error: in move_insn, at haifa-sched.c:5463
@ 2022-06-12 13:03 stsp at users dot sourceforge.net
2022-06-12 16:57 ` [Bug rtl-optimization/105936] [10 Regression] " pinskia at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: stsp at users dot sourceforge.net @ 2022-06-12 13:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105936
Bug ID: 105936
Summary: internal compiler error: in move_insn, at
haifa-sched.c:5463
Product: gcc
Version: 9.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: gcov-profile
Assignee: unassigned at gcc dot gnu.org
Reporter: stsp at users dot sourceforge.net
CC: marxin at gcc dot gnu.org
Target Milestone: ---
Created attachment 53124
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53124&action=edit
pre-processed source
The problem happens with 9.4.0
in ubuntu-20, and with more recent
gcc in ubuntu-21.10, but not sure
what exact version of gcc is there.
$ gcc -O2 -c -xc int.E
during RTL pass: sched2
/<<PKGBUILDDIR>>/build/../src/base/core/int.c: In function
‘int33_unrevect_fixup’:
/<<PKGBUILDDIR>>/build/../src/base/core/int.c:1746:1: internal compiler error:
in move_insn, at haifa-sched.c:5463
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/105936] [10 Regression] internal compiler error: in move_insn, at haifa-sched.c:5463
2022-06-12 13:03 [Bug gcov-profile/105936] New: internal compiler error: in move_insn, at haifa-sched.c:5463 stsp at users dot sourceforge.net
@ 2022-06-12 16:57 ` pinskia at gcc dot gnu.org
2022-06-12 17:33 ` [Bug rtl-optimization/105936] [10 Regression] ICE with inline-asm and TLS on x86_64 and -O2 in move_insn pinskia at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-06-12 16:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105936
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |10.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/105936] [10 Regression] ICE with inline-asm and TLS on x86_64 and -O2 in move_insn
2022-06-12 13:03 [Bug gcov-profile/105936] New: internal compiler error: in move_insn, at haifa-sched.c:5463 stsp at users dot sourceforge.net
2022-06-12 16:57 ` [Bug rtl-optimization/105936] [10 Regression] " pinskia at gcc dot gnu.org
@ 2022-06-12 17:33 ` pinskia at gcc dot gnu.org
2022-06-12 17:35 ` pinskia at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-06-12 17:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105936
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|needs-reduction |inline-asm
Summary|[10 Regression] internal |[10 Regression] ICE with
|compiler error: in |inline-asm and TLS on
|move_insn, at |x86_64 and -O2 in move_insn
|haifa-sched.c:5463 |
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase:
typedef struct {
unsigned short offset;
unsigned short segment;
} far_t;
extern __thread int vm86u[8];
int int33_hooked;
int is_revectored(void);
void log_printf(void);
far_t int33_unrevect(unsigned short gg)
{
far_t ret = {};
if (int33_hooked)
return ret;
if (is_revectored())
{
log_printf();
__asm__ __volatile__("" : :"m" (vm86u[0]));
}
else
{
if (gg)
log_printf();
}
ret.segment = 0x0f000;
ret.offset = 0xf847;
return ret;
}
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/105936] [10 Regression] ICE with inline-asm and TLS on x86_64 and -O2 in move_insn
2022-06-12 13:03 [Bug gcov-profile/105936] New: internal compiler error: in move_insn, at haifa-sched.c:5463 stsp at users dot sourceforge.net
2022-06-12 16:57 ` [Bug rtl-optimization/105936] [10 Regression] " pinskia at gcc dot gnu.org
2022-06-12 17:33 ` [Bug rtl-optimization/105936] [10 Regression] ICE with inline-asm and TLS on x86_64 and -O2 in move_insn pinskia at gcc dot gnu.org
@ 2022-06-12 17:35 ` pinskia at gcc dot gnu.org
2022-06-13 7:41 ` ubizjak at gmail dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-06-12 17:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105936
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |needs-reduction
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note my reduced testcase fails on 11.2.0 but passes on both 10.x and 11.3.0. So
I might have reduced it to the wrong one.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/105936] [10 Regression] ICE with inline-asm and TLS on x86_64 and -O2 in move_insn
2022-06-12 13:03 [Bug gcov-profile/105936] New: internal compiler error: in move_insn, at haifa-sched.c:5463 stsp at users dot sourceforge.net
` (2 preceding siblings ...)
2022-06-12 17:35 ` pinskia at gcc dot gnu.org
@ 2022-06-13 7:41 ` ubizjak at gmail dot com
2022-06-13 9:19 ` ubizjak at gmail dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2022-06-13 7:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105936
--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
For some reason, split1 pass converts (insn):
(insn 54 51 109 9 (parallel [
(asm_operands/v ("btrl %1,%0") ("") 0 [
(mem/c:BLK (plus:DI (plus:DI (unspec:DI [
(const_int 0 [0])
] UNSPEC_TP)
(reg:DI 100))
(const_int 96 [0x60])) [21 MEM[(struct
revectored_struct *)&vm86u + 96B]+0 S32 A32])
(reg:SI 101)
]
[
(asm_input:BLK ("m") ../../../src/include/cpu.h:355)
(asm_input:SI ("r") ../../../src/include/cpu.h:355)
]
[] ../../../src/include/cpu.h:355)
(clobber (reg:CC 17 flags))
]) "../../../src/include/cpu.h":355:2 -1
(expr_list:REG_DEAD (reg:SI 101)
(expr_list:REG_DEAD (reg:DI 100)
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil)))))
to (jump_insn):
(jump_insn 111 51 113 9 (parallel [
(asm_operands/v ("btrl %1,%0") ("") 0 [
(mem/c:BLK (plus:DI (reg:DI 100)
(const_int 96 [0x60])) [21 MEM[(struct
revectored_struct *)&vm86u + 96B]+0 S32 A32 AS1])
(reg:SI 101)
]
[
(asm_input:BLK ("m") ../../../src/include/cpu.h:355)
(asm_input:SI ("r") ../../../src/include/cpu.h:355)
]
[] ../../../src/include/cpu.h:355)
(clobber (reg:CC 17 flags))
]) "../../../src/include/cpu.h":355:2 -1
(nil))
This confuses sched2 pass.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/105936] [10 Regression] ICE with inline-asm and TLS on x86_64 and -O2 in move_insn
2022-06-12 13:03 [Bug gcov-profile/105936] New: internal compiler error: in move_insn, at haifa-sched.c:5463 stsp at users dot sourceforge.net
` (3 preceding siblings ...)
2022-06-13 7:41 ` ubizjak at gmail dot com
@ 2022-06-13 9:19 ` ubizjak at gmail dot com
2022-06-13 10:04 ` ubizjak at gmail dot com
2022-06-13 10:19 ` stsp at users dot sourceforge.net
6 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2022-06-13 9:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105936
--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
Digging a bit further with current gcc-10 branch...
Instrumenting a TLS address splitter in i386.md with some creative printfs:
(define_split
[(match_operand 0 "tls_address_pattern")]
"TARGET_TLS_DIRECT_SEG_REFS"
[(match_dup 0)]
{
debug_rtx (curr_insn);
debug_rtx (operands[0]);
printf ("%s\n", GET_RTX_NAME (classify_insn (operands[0])));
operands[0] = ix86_rewrite_tls_address (operands[0]);
debug_rtx (operands[0]);
printf ("%s\n", GET_RTX_NAME (classify_insn (operands[0])));
})
we get:
(insn 54 51 109 9 (parallel [
(asm_operands/v ("btrl %1,%0") ("") 0 [
(mem/c:BLK (plus:DI (plus:DI (unspec:DI [
(const_int 0 [0])
] UNSPEC_TP)
(reg:DI 100))
(const_int 96 [0x60])) [21 MEM[(struct
revectored_struct *)&vm86u + 96B]+0 S32 A32])
(reg:SI 101)
]
[
(asm_input:BLK ("m") ../../../src/include/cpu.h:355)
(asm_input:SI ("r") ../../../src/include/cpu.h:355)
]
[] ../../../src/include/cpu.h:355)
(clobber (reg:CC 17 flags))
]) "../../../src/include/cpu.h":355:2 -1
(expr_list:REG_DEAD (reg:SI 101)
(expr_list:REG_DEAD (reg:DI 100)
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil)))))
(parallel [
(asm_operands/v ("btrl %1,%0") ("") 0 [
(mem/c:BLK (plus:DI (plus:DI (unspec:DI [
(const_int 0 [0])
] UNSPEC_TP)
(reg:DI 100))
(const_int 96 [0x60])) [21 MEM[(struct
revectored_struct *)&vm86u + 96B]+0 S32 A32])
(reg:SI 101)
]
[
(asm_input:BLK ("m") ../../../src/include/cpu.h:355)
(asm_input:SI ("r") ../../../src/include/cpu.h:355)
]
[] ../../../src/include/cpu.h:355)
(clobber (reg:CC 17 flags))
])
jump_insn
(parallel [
(asm_operands/v ("btrl %1,%0") ("") 0 [
(mem/c:BLK (plus:DI (reg:DI 100)
(const_int 96 [0x60])) [21 MEM[(struct
revectored_struct *)&vm86u + 96B]+0 S32 A32 AS1])
(reg:SI 101)
]
[
(asm_input:BLK ("m") ../../../src/include/cpu.h:355)
(asm_input:SI ("r") ../../../src/include/cpu.h:355)
]
[] ../../../src/include/cpu.h:355)
(clobber (reg:CC 17 flags))
])
jump_insn
Please note that classify_insn declares the pattern as JUMP_INSN due to:
if (GET_CODE (x) == ASM_OPERANDS && ASM_OPERANDS_LABEL_VEC (x))
return JUMP_INSN;
but no label is defined in asm operands.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/105936] [10 Regression] ICE with inline-asm and TLS on x86_64 and -O2 in move_insn
2022-06-12 13:03 [Bug gcov-profile/105936] New: internal compiler error: in move_insn, at haifa-sched.c:5463 stsp at users dot sourceforge.net
` (4 preceding siblings ...)
2022-06-13 9:19 ` ubizjak at gmail dot com
@ 2022-06-13 10:04 ` ubizjak at gmail dot com
2022-06-13 10:19 ` stsp at users dot sourceforge.net
6 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2022-06-13 10:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105936
Uroš Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> ---
Dup of PR104777, the patch from the PR should be backported to gcc-10.
*** This bug has been marked as a duplicate of bug 104777 ***
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/105936] [10 Regression] ICE with inline-asm and TLS on x86_64 and -O2 in move_insn
2022-06-12 13:03 [Bug gcov-profile/105936] New: internal compiler error: in move_insn, at haifa-sched.c:5463 stsp at users dot sourceforge.net
` (5 preceding siblings ...)
2022-06-13 10:04 ` ubizjak at gmail dot com
@ 2022-06-13 10:19 ` stsp at users dot sourceforge.net
6 siblings, 0 replies; 8+ messages in thread
From: stsp at users dot sourceforge.net @ 2022-06-13 10:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105936
Stas Sergeev <stsp at users dot sourceforge.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|DUPLICATE |FIXED
--- Comment #6 from Stas Sergeev <stsp at users dot sourceforge.net> ---
But no patch is back-ported,
and already closing the ticket?
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-06-13 10:19 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-12 13:03 [Bug gcov-profile/105936] New: internal compiler error: in move_insn, at haifa-sched.c:5463 stsp at users dot sourceforge.net
2022-06-12 16:57 ` [Bug rtl-optimization/105936] [10 Regression] " pinskia at gcc dot gnu.org
2022-06-12 17:33 ` [Bug rtl-optimization/105936] [10 Regression] ICE with inline-asm and TLS on x86_64 and -O2 in move_insn pinskia at gcc dot gnu.org
2022-06-12 17:35 ` pinskia at gcc dot gnu.org
2022-06-13 7:41 ` ubizjak at gmail dot com
2022-06-13 9:19 ` ubizjak at gmail dot com
2022-06-13 10:04 ` ubizjak at gmail dot com
2022-06-13 10:19 ` stsp at users dot sourceforge.net
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).