optimization/10536: [3.3/3.4 regression] Linux kernel miscompiled on s390

uweigand@de.ibm.com uweigand@de.ibm.com
Tue Apr 29 14:10:00 GMT 2003


>Number:         10536
>Category:       optimization
>Synopsis:       [3.3/3.4 regression] Linux kernel miscompiled on s390
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 29 13:16:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     uweigand@de.ibm.com
>Release:        gcc 3.3, head
>Organization:
>Environment:
s390-ibm-linux / s390x-ibm-linux
>Description:
In the following test case:

extern int global_var;
void test (void)
{
   int x = global_var;
   asm volatile ("" : "+d" (x));
}

the instruction to load 'global_var' into a register
is erroneously omitted.  This causes incorrect code
to be generated for the Linux kernel on s390.

This is a regression over 3.2, introduced by this patch:
http://gcc.gnu.org/ml/gcc-patches/2003-03/msg01070.html
>How-To-Repeat:
Compile the test case shown above, and verify whether
the resulting assembler code references 'global_var'.
>Fix:
Either revert
http://gcc.gnu.org/ml/gcc-patches/2003-03/msg01070.html
or add the fix
http://gcc.gnu.org/ml/gcc-patches/2003-04/msg01318.html
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list