This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
target/9617: gcc/ia64: bad code generated for __builtin_ia64_bsp()
- From: davidm at hpl dot hp dot com
- To: gcc-gnats at gcc dot gnu dot org
- Cc: wilson at redhat dot com, rth at redhat dot com
- Date: 7 Feb 2003 19:34:40 -0000
- Subject: target/9617: gcc/ia64: bad code generated for __builtin_ia64_bsp()
- Reply-to: davidm at hpl dot hp dot com
>Number: 9617
>Category: target
>Synopsis: gcc/ia64: bad code generated for __builtin_ia64_bsp()
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Feb 07 19:36:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: davidm@hpl.hp.com
>Release: gcc-3.2 (seems to affect all gcc/ia64 versions that support __builtin_ia64_bsp())
>Organization:
>Environment:
ia64 linux
>Description:
GCC appears to generate bad code when __builtin_ia64_bsp()
gets predicated. When compiling the attached test program
with gcc v3.2, for example, the assembler will generate the
following error message:
$ gcc-3.2 -O /tmp/t.c
/tmp/ccfZBgfD.s: Assembler messages:
/tmp/ccfZBgfD.s:23: Error: qualifying predicate not followed by instruction
The problem is due to the fact that GCC emitted a line
containing only a predicate and a stop bit:
(p6) ;;
which isn't valid code.
>How-To-Repeat:
Just compile the attached program with gcc -O:
$ gcc -O t.c
/tmp/cc41L7v8.s: Assembler messages:
/tmp/cc41L7v8.s:20: Error: qualifying predicate not followed by instruction
The problem exists with 2.96, 3.2, and pre3.4 (as of Jan 10th, 2003).
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-csrc; name="t.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="t.c"
aW50Cm1haW4gKGludCBhcmdjKQp7CiAgaWYgKGFyZ2MpCiAgICBwcmludGYgKCIlcCIsIF9fYnVp
bHRpbl9pYTY0X2JzcCAoKSk7Cn0K