public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/33436] New: Bad constant output with TARGET_ASM_ALIGNED_DI_OP
@ 2007-09-14 15:00 danglin at gcc dot gnu dot org
2007-09-22 1:19 ` [Bug middle-end/33436] " danglin at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: danglin at gcc dot gnu dot org @ 2007-09-14 15:00 UTC (permalink / raw)
To: gcc-bugs
Executing on host: /mnt/gnu/gcc/objdir/gcc/xgcc -B/mnt/gnu/gcc/objdir/gcc/
/mnt/
gnu/gcc/gcc/gcc/testsuite/gcc.dg/pr32912-2.c -O2 -w -fno-show-column -lm
-o
./pr32912-2.exe (timeout = 300)
/var/tmp//cclFD5RH.s: Assembler messages:
/var/tmp//cclFD5RH.s:5: Warning: bignum truncated to 8 bytes
output is:
/var/tmp//cclFD5RH.s: Assembler messages:
/var/tmp//cclFD5RH.s:5: Warning: bignum truncated to 8 bytes
FAIL: gcc.dg/pr32912-2.c (test for excess errors)
Excess errors:
/var/tmp//cclFD5RH.s:5: Warning: bignum truncated to 8 bytes
Setting LD_LIBRARY_PATH to :/mnt/gnu/gcc/objdir/gcc::/mnt/gnu/gcc/objdir/gcc
FAIL: gcc.dg/pr32912-2.c execution test
.LEVEL 2.0w
.section .rodata
.align 8
L$C0000:
.dword 0x11111111222222224444444400000000
...
Mainline is ok.
--
Summary: Bad constant output with TARGET_ASM_ALIGNED_DI_OP
Product: gcc
Version: 4.2.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: danglin at gcc dot gnu dot org
GCC build triplet: hppa64-hp-hpux11.11
GCC host triplet: hppa64-hp-hpux11.11
GCC target triplet: hppa64-hp-hpux11.11
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33436
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/33436] Bad constant output with TARGET_ASM_ALIGNED_DI_OP
2007-09-14 15:00 [Bug middle-end/33436] New: Bad constant output with TARGET_ASM_ALIGNED_DI_OP danglin at gcc dot gnu dot org
@ 2007-09-22 1:19 ` danglin at gcc dot gnu dot org
2007-09-28 0:54 ` danglin at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: danglin at gcc dot gnu dot org @ 2007-09-22 1:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from danglin at gcc dot gnu dot org 2007-09-22 01:18 -------
Although it might be possible to fix this at an earlier point,
things go seriously wrong in emit_group_load_1. We have:
Breakpoint 7, emit_group_load_1 (tmps=0x800003fffdff4a70,
dst=0x800003fffdfb7540, orig_src=0x800003fffdfacf30,
type=0x800003fffdf9b750, ssize=16) at ../../gcc/gcc/expr.c:1779
1779 else if (CONSTANT_P (src))
(gdb) p debug_rtx (src)
(const_double 4919131751843889152 [0x4444444400000000] 1229782938533634594
[0x1111111122222222] 0 [0x0] 0 [0x0])
$7 = void
(gdb) p debug_rtx (dst)
(parallel:BLK [
(expr_list:REG_DEP_TRUE (reg:DI 66 [ <result> ])
(const_int 0 [0x0]))
(expr_list:REG_DEP_TRUE (reg:DI 67 [ <result>+8 ])
(const_int 8 [0x8]))
])
As can be seen, dst is a parallel but src is a CONST_DOUBLE. The code
as currently written assigns src to both parts of the parallel.
I believe this occurs because hppa64 doesn't support TImode.
The break above is in a modified version of expr.c which appears to
correct the problem. Here's the diff:
Index: expr.c
===================================================================
--- expr.c (revision 128642)
+++ expr.c (working copy)
@@ -1776,8 +1776,23 @@
else if (CONSTANT_P (src) && GET_MODE (dst) != BLKmode
&& XVECLEN (dst, 0) > 1)
tmps[i] = simplify_gen_subreg (mode, src, GET_MODE(dst), bytepos);
- else if (CONSTANT_P (src)
- || (REG_P (src) && GET_MODE (src) == mode))
+ else if (CONSTANT_P (src))
+ {
+ if ((HOST_WIDE_INT) bytelen == ssize)
+ tmps[i] = src;
+ else
+ {
+ rtx first, second;
+
+ gcc_assert (i <= 1);
+ split_double (src, &first, &second);
+ if (i)
+ tmps[i] = second;
+ else
+ tmps[i] = first;
+ }
+ }
+ else if (REG_P (src) && GET_MODE (src) == mode)
tmps[i] = src;
else
tmps[i] = extract_bit_field (src, bytelen * BITS_PER_UNIT,
I used split_double because neither simplify_subreg or extract_bit_field
handle this.
I'm a little unhappy about splitting the double but in some cases it is
possible to load the values without forcing them to memory. In any event,
this is a rare situation.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33436
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/33436] Bad constant output with TARGET_ASM_ALIGNED_DI_OP
2007-09-14 15:00 [Bug middle-end/33436] New: Bad constant output with TARGET_ASM_ALIGNED_DI_OP danglin at gcc dot gnu dot org
2007-09-22 1:19 ` [Bug middle-end/33436] " danglin at gcc dot gnu dot org
@ 2007-09-28 0:54 ` danglin at gcc dot gnu dot org
2007-09-28 0:57 ` danglin at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: danglin at gcc dot gnu dot org @ 2007-09-28 0:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from danglin at gcc dot gnu dot org 2007-09-28 00:54 -------
Subject: Bug 33436
Author: danglin
Date: Fri Sep 28 00:54:29 2007
New Revision: 128855
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128855
Log:
PR middle-end/33436
* expr.c (emit_group_load_1): Split constant double when destination
length is half source length.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/expr.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33436
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/33436] Bad constant output with TARGET_ASM_ALIGNED_DI_OP
2007-09-14 15:00 [Bug middle-end/33436] New: Bad constant output with TARGET_ASM_ALIGNED_DI_OP danglin at gcc dot gnu dot org
2007-09-22 1:19 ` [Bug middle-end/33436] " danglin at gcc dot gnu dot org
2007-09-28 0:54 ` danglin at gcc dot gnu dot org
@ 2007-09-28 0:57 ` danglin at gcc dot gnu dot org
2008-01-22 19:54 ` danglin at gcc dot gnu dot org
2008-01-22 20:07 ` danglin at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: danglin at gcc dot gnu dot org @ 2007-09-28 0:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from danglin at gcc dot gnu dot org 2007-09-28 00:57 -------
Fixed on trunk.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33436
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/33436] Bad constant output with TARGET_ASM_ALIGNED_DI_OP
2007-09-14 15:00 [Bug middle-end/33436] New: Bad constant output with TARGET_ASM_ALIGNED_DI_OP danglin at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-09-28 0:57 ` danglin at gcc dot gnu dot org
@ 2008-01-22 19:54 ` danglin at gcc dot gnu dot org
2008-01-22 20:07 ` danglin at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-01-22 19:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from danglin at gcc dot gnu dot org 2008-01-22 19:40 -------
Subject: Bug 33436
Author: danglin
Date: Tue Jan 22 19:39:39 2008
New Revision: 131739
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131739
Log:
PR middle-end/33436
* expr.c (emit_group_load_1): Split constant double when destination
length is half source length.
Modified:
branches/gcc-4_2-branch/gcc/ChangeLog
branches/gcc-4_2-branch/gcc/expr.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33436
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/33436] Bad constant output with TARGET_ASM_ALIGNED_DI_OP
2007-09-14 15:00 [Bug middle-end/33436] New: Bad constant output with TARGET_ASM_ALIGNED_DI_OP danglin at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-01-22 19:54 ` danglin at gcc dot gnu dot org
@ 2008-01-22 20:07 ` danglin at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-01-22 20:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from danglin at gcc dot gnu dot org 2008-01-22 19:50 -------
Fixed on 4.2.
--
danglin at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33436
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-01-22 19:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-14 15:00 [Bug middle-end/33436] New: Bad constant output with TARGET_ASM_ALIGNED_DI_OP danglin at gcc dot gnu dot org
2007-09-22 1:19 ` [Bug middle-end/33436] " danglin at gcc dot gnu dot org
2007-09-28 0:54 ` danglin at gcc dot gnu dot org
2007-09-28 0:57 ` danglin at gcc dot gnu dot org
2008-01-22 19:54 ` danglin at gcc dot gnu dot org
2008-01-22 20:07 ` danglin at gcc dot gnu 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).