This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled
- From: "schwab at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Dec 2004 14:49:17 -0000
- Subject: [Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
$ gcc-4.0 -O2 -std=gnu99 vfprintf.i
$ ./a.out
(null)
$ gcc-3.4 -O2 -std=gnu99 vfprintf.i
$ ./a.out
asdf
The problem is that "string = (char *) __builtin_va_arg(ap,const char *)" is
compiled into this:
.mmi
adds r34 = 8, r34
;;
ld8 r37 = [r34]
ie. preincrement instead of postincrement.
--
Summary: [4.0 regression] __builtin_va_arg miscompiled
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schwab at suse dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: ia64-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18888