This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

target/9617: gcc/ia64: bad code generated for __builtin_ia64_bsp()


>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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]