[Bug target/18888] New: [4.0 regression] __builtin_va_arg miscompiled

schwab at suse dot de gcc-bugzilla@gcc.gnu.org
Wed Dec 8 14:49:00 GMT 2004


$ 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



More information about the Gcc-bugs mailing list