public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/58426] New: vax fails to compile gcov.c in stage1
@ 2013-09-15 13:10 martin at netbsd dot org
2013-09-15 13:36 ` [Bug target/58426] " martin at netbsd dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: martin at netbsd dot org @ 2013-09-15 13:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58426
Bug ID: 58426
Summary: vax fails to compile gcov.c in stage1
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: martin at netbsd dot org
Compilation stops with:
../../../gcc-4.8.1/libgcc/libgcov.c:827:1: internal compiler error:
output_operand: invalid expression as operand
(will dig into it and provide more info)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/58426] vax fails to compile gcov.c in stage1
2013-09-15 13:10 [Bug target/58426] New: vax fails to compile gcov.c in stage1 martin at netbsd dot org
@ 2013-09-15 13:36 ` martin at netbsd dot org
2013-09-15 14:17 ` martin at netbsd dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: martin at netbsd dot org @ 2013-09-15 13:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58426
--- Comment #1 from Martin Husemann <martin at netbsd dot org> ---
The error happens here:
#1 0x002d15ca in output_addr_const (file=0x7f5b79c8,
x=0x7f10a250, 2136701384, 2131796560) at ../../gcc-4.8.1/gcc/final.c:3877
#2 0x002d1466 in output_addr_const (file=0x7f5b79c8,
x=0x7ecb52a0, 2136701384, 2127254176) at ../../gcc-4.8.1/gcc/final.c:3837
#3 0x00762eb4 in print_operand (file=0x7f5b79c8, x=0x7ecb52a0,
code=0, 2136701384, 2127254176, 0)
at ../../gcc-4.8.1/gcc/config/vax/vax.c:557
#4 0x00520a05 in default_print_operand (stream=0x7f5b79c8, x=0x7ecb52a0,
code=0, 2136701384, 2127254176, 0) at ../../gcc-4.8.1/gcc/targhooks.c:327
#5 0x002d1a04 in output_operand (x=0x7ecb52a0, code=0, 2127254176, 0)
at ../../gcc-4.8.1/gcc/final.c:3735
#6 0x002d1dcb in output_asm_insn (templ=0x9245a0 "addl3 %1,%2,%0",
operands=0xc7fee0, 9586080, 13106912) at ../../gcc-4.8.1/gcc/final.c:3633
#7 0x002d45b1 in final_scan_insn (insn=0x7ec4ce58, file=0x7f5b79c8,
optimize_p=1, nopeepholes=0,
seen=0x7fffe438, 2126827096, 2136701384, 1, 0, 2147476536)
at ../../gcc-4.8.1/gcc/final.c:2931
#8 0x002d4a08 in final (first=0x7ec2d9c0, file=0x7f5b79c8,
optimize_p=1, 2126698944, 2136701384, 1)
at ../../gcc-4.8.1/gcc/final.c:1967
and the expression passed by vax.c to output_addr_const() is:
$3 = {code = PLUS, mode = SImode, jump = 0, call = 0, unchanging = 0,
volatil = 0, in_struct = 0, used = 0, frame_related = 0, return_val = 0,
u = {fld = {{rt_int = 2131796560, rt_uint = 2131796560,
rt_str = 0x7f10a250 "&", rt_rtx = 0x7f10a250, rt_rtvec = 0x7f10a250,
rt_type = 2131796560, rt_addr_diff_vec_flags = {min_align = 80,
base_after_vec = 0, min_after_vec = 1, max_after_vec = 0,
min_after_base = 0, max_after_base = 0, offset_unsigned = 1,
scale = 16}, rt_cselib = 0x7f10a250, rt_tree = 0x7f10a250,
rt_bb = 0x7f10a250, rt_mem = 0x7f10a250, rt_reg = 0x7f10a250,
rt_constant = 0x7f10a250, rt_cfi = 0x7f10a250}}, hwint = {2131796560},
block_sym = {fld = {{rt_int = 2131796560, rt_uint = 2131796560,
rt_str = 0x7f10a250 "&", rt_rtx = 0x7f10a250, rt_rtvec = 0x7f10a250,
rt_type = 2131796560, rt_addr_diff_vec_flags = {min_align = 80,
base_after_vec = 0, min_after_vec = 1, max_after_vec = 0,
min_after_base = 0, max_after_base = 0, offset_unsigned = 1,
scale = 16}, rt_cselib = 0x7f10a250, rt_tree = 0x7f10a250,
rt_bb = 0x7f10a250, rt_mem = 0x7f10a250, rt_reg = 0x7f10a250,
rt_constant = 0x7f10a250, rt_cfi = 0x7f10a250}, {
rt_int = 2126996200, rt_uint = 2126996200,
rt_str = 0x7ec762e8 "\037", rt_rtx = 0x7ec762e8,
rt_rtvec = 0x7ec762e8, rt_type = 2126996200,
rt_addr_diff_vec_flags = {min_align = 232, base_after_vec = 0,
min_after_vec = 1, max_after_vec = 0, min_after_base = 0,
max_after_base = 0, offset_unsigned = 1, scale = 199},
rt_cselib = 0x7ec762e8, rt_tree = 0x7ec762e8, rt_bb = 0x7ec762e8,
rt_mem = 0x7ec762e8, rt_reg = 0x7ec762e8, rt_constant = 0x7ec762e8,
rt_cfi = 0x7ec762e8}, {rt_int = 393266, rt_uint = 393266,
rt_str = 0x60032 "ded_initEjj", rt_rtx = 0x60032,
rt_rtvec = 0x60032, rt_type = 393266, rt_addr_diff_vec_flags = {
min_align = 50, base_after_vec = 0, min_after_vec = 0,
max_after_vec = 0, min_after_base = 0, max_after_base = 0,
offset_unsigned = 0, scale = 6}, rt_cselib = 0x60032,
rt_tree = 0x60032, rt_bb = 0x60032, rt_mem = 0x60032,
rt_reg = 0x60032, rt_constant = 0x60032, rt_cfi = 0x60032}},
block = 0x7f10a250, offset = 2126996200}, rv = {cl = 0, decimal = 0,
sign = 0, signalling = 1, canonical = 0, uexp = 33309321, sig = {
2126996200, 393266, 2131796560, 2126996200, 23}}, fv = {data = {
low = 2131796560, high = 2126996200}, mode = 393266}}}
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/58426] vax fails to compile gcov.c in stage1
2013-09-15 13:10 [Bug target/58426] New: vax fails to compile gcov.c in stage1 martin at netbsd dot org
2013-09-15 13:36 ` [Bug target/58426] " martin at netbsd dot org
@ 2013-09-15 14:17 ` martin at netbsd dot org
2013-09-15 23:43 ` jbglaw@lug-owl.de
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: martin at netbsd dot org @ 2013-09-15 14:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58426
--- Comment #2 from Martin Husemann <martin at netbsd dot org> ---
The more interesting XEXP(x, 0) of that rtx is the one triggering the failure:
$15 = {code = REG, mode = SImode, jump = 0, call = 0, unchanging = 0,
volatil = 0, in_struct = 0, used = 0, frame_related = 1, return_val = 0,
u = {fld = {{rt_int = 13, rt_uint = 13,
rt_str = 0xd <Address 0xd out of bounds>, rt_rtx = 0xd,
rt_rtvec = 0xd, rt_type = TQmode, rt_addr_diff_vec_flags = {
min_align = 13, base_after_vec = 0, min_after_vec = 0,
max_after_vec = 0, min_after_base = 0, max_after_base = 0,
offset_unsigned = 0, scale = 0}, rt_cselib = 0xd, rt_tree = 0xd,
rt_bb = 0xd, rt_mem = 0xd, rt_reg = 0xd, rt_constant = 0xd,
rt_cfi = 0xd}}, hwint = {13}, block_sym = {fld = {{rt_int = 13,
rt_uint = 13, rt_str = 0xd <Address 0xd out of bounds>,
rt_rtx = 0xd, rt_rtvec = 0xd, rt_type = TQmode,
rt_addr_diff_vec_flags = {min_align = 13, base_after_vec = 0,
min_after_vec = 0, max_after_vec = 0, min_after_base = 0,
max_after_base = 0, offset_unsigned = 0, scale = 0},
rt_cselib = 0xd, rt_tree = 0xd, rt_bb = 0xd, rt_mem = 0xd,
rt_reg = 0xd, rt_constant = 0xd, rt_cfi = 0xd}, {rt_int = 13,
rt_uint = 13, rt_str = 0xd <Address 0xd out of bounds>,
rt_rtx = 0xd, rt_rtvec = 0xd, rt_type = TQmode,
rt_addr_diff_vec_flags = {min_align = 13, base_after_vec = 0,
min_after_vec = 0, max_after_vec = 0, min_after_base = 0,
max_after_base = 0, offset_unsigned = 0, scale = 0},
rt_cselib = 0xd, rt_tree = 0xd, rt_bb = 0xd, rt_mem = 0xd,
rt_reg = 0xd, rt_constant = 0xd, rt_cfi = 0xd}, {rt_int = 0,
rt_uint = 0, rt_str = 0x0, rt_rtx = 0x0, rt_rtvec = 0x0,
rt_type = VOIDmode, rt_addr_diff_vec_flags = {min_align = 0,
base_after_vec = 0, min_after_vec = 0, max_after_vec = 0,
min_after_base = 0, max_after_base = 0, offset_unsigned = 0,
scale = 0}, rt_cselib = 0x0, rt_tree = 0x0, rt_bb = 0x0,
rt_mem = 0x0, rt_reg = 0x0, rt_constant = 0x0, rt_cfi = 0x0}},
block = 0x40060026, offset = 12}, rv = {cl = 1, decimal = 1, sign = 1,
signalling = 0, canonical = 0, uexp = 0, sig = {13, 0, 1074135078, 12,
12}}, fv = {data = {low = 13, high = 13}, mode = VOIDmode}}}
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/58426] vax fails to compile gcov.c in stage1
2013-09-15 13:10 [Bug target/58426] New: vax fails to compile gcov.c in stage1 martin at netbsd dot org
2013-09-15 13:36 ` [Bug target/58426] " martin at netbsd dot org
2013-09-15 14:17 ` martin at netbsd dot org
@ 2013-09-15 23:43 ` jbglaw@lug-owl.de
2013-09-16 6:36 ` ebotcazou at gcc dot gnu.org
2013-09-16 7:54 ` martin at netbsd dot org
4 siblings, 0 replies; 6+ messages in thread
From: jbglaw@lug-owl.de @ 2013-09-15 23:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58426
--- Comment #3 from Jan-Benedict Glaw <jbglaw@lug-owl.de> ---
Hm, the initial PLUS part looks a bit like what I ment to fix with a recent
patch. How old is your checkout? My fix was committed as r202600 /
git:3719e41cf6b9d. So I hope I didn't break something else. (This showed up in
GIT at Sun Sep 15 09:44:29 2013 +0000.)
For reference:
http://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3719e41cf6b9d447d8e8e2971d6a459bc41853b2
--- a/gcc/config/vax/constraints.md
+++ b/gcc/config/vax/constraints.md
@@ -114,5 +114,6 @@
(define_constraint "T"
"@internal satisfies CONSTANT_P and, if pic is enabled, is not a
SYMBOL_REF, LABEL_REF, or CONST."
- (ior (not (match_code "const,symbol_ref,label_ref"))
- (match_test "!flag_pic")))
+ (and (match_test ("CONSTANT_P (op)"))
+ (ior (not (match_code "symbol_ref,label_ref,const"))
+ (match_test "!flag_pic"))))
As you seem to use 4.8.1, your GCC is older than my commit, so I think
backporting this patch would probably cure your problem. Give it a try!
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/58426] vax fails to compile gcov.c in stage1
2013-09-15 13:10 [Bug target/58426] New: vax fails to compile gcov.c in stage1 martin at netbsd dot org
` (2 preceding siblings ...)
2013-09-15 23:43 ` jbglaw@lug-owl.de
@ 2013-09-16 6:36 ` ebotcazou at gcc dot gnu.org
2013-09-16 7:54 ` martin at netbsd dot org
4 siblings, 0 replies; 6+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2013-09-16 6:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58426
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu.org
--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Use p debug_rtx(...) from within GDB instead of raw dumping RTXes...
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/58426] vax fails to compile gcov.c in stage1
2013-09-15 13:10 [Bug target/58426] New: vax fails to compile gcov.c in stage1 martin at netbsd dot org
` (3 preceding siblings ...)
2013-09-16 6:36 ` ebotcazou at gcc dot gnu.org
@ 2013-09-16 7:54 ` martin at netbsd dot org
4 siblings, 0 replies; 6+ messages in thread
From: martin at netbsd dot org @ 2013-09-16 7:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58426
Martin Husemann <martin at netbsd dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Martin Husemann <martin at netbsd dot org> ---
> As you seem to use 4.8.1, your GCC is older than my commit, so I think
> backporting this patch would probably cure your problem. Give it a try!
Yes, I was using stock 4.8.1.
And indeed this change seems to fix it. Thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-09-16 7:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-15 13:10 [Bug target/58426] New: vax fails to compile gcov.c in stage1 martin at netbsd dot org
2013-09-15 13:36 ` [Bug target/58426] " martin at netbsd dot org
2013-09-15 14:17 ` martin at netbsd dot org
2013-09-15 23:43 ` jbglaw@lug-owl.de
2013-09-16 6:36 ` ebotcazou at gcc dot gnu.org
2013-09-16 7:54 ` martin at netbsd dot 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).