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]

[Bug optimization/11320] New: [3.3 regression] [ia64] Reload bug


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11320

           Summary: [3.3 regression] [ia64] Reload bug
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: critical
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: schwab at suse dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: ia64-suse-linux
  GCC host triplet: ia64-suse-linux
GCC target triplet: ia64-suse-linux

Register r14 is used for two different values at the same time. 
 
$ cat http_core.c 
int strcmp (const char *, const char *); 
int printf (const char *, ...); 
int ap_standalone; 
const char * 
ap_check_cmd_context (void *a, int b) 
{ 
  return 0; 
} 
 
const char * 
server_type (void *a, void *b, char *arg) 
{ 
  const char *err = ap_check_cmd_context (a, 0x01|0x02|0x04|0x08|0x10); 
  if (err) 
    return err; 
 
  if (!strcmp (arg, "inetd")) 
    ap_standalone = 0; 
  else if (!strcmp (arg, "standalone")) 
    { 
      // printf ("standalone"); 
      ap_standalone = 1; 
    } 
  else 
    return "ServerType must be either 'inetd' or 'standalone'"; 
 
  return 0; 
} 
 
int 
main () 
{ 
  server_type (0, 0, "standalone"); 
} 
$ gcc -O2 -g http_core.c 
$ ./a.out 
Segmentation fault 
 
	addl r14 = @ltoffx(ap_standalone#), r1 
	;; 
	.mii 
	ld8.mov r15 = [r14], ap_standalone# 
	addl r14 = @ltoffx(.LC2), r1 
	;; 
	(p7) addl r14 = 1, r0		<--- r14 clobbered 
	;; 
	.mii 
	(p7) st4 [r15] = r14 
	nop.i 0 
	nop.i 0 
	.mbb 
	ld8.mov r14 = [r14], .LC2	<--- crash 
 
Workaround: compile with -fno-sched-interblock or -fno-if-conversion2 or 
-fno-sched-spec or -fno-schedule-insns.


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