Bug 102747
Summary: | Bad code when compiling ip_vs_core.c | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | r6144 <r6k> | ||||
Component: | gcc | Assignee: | Jakub Jelinek <jakub> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Brian Brock <bbrock> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 9 | ||||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i686 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | 3.2.3-17 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2003-08-29 14:26:23 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
r6144
2003-08-20 16:00:16 UTC
Created attachment 93781 [details]
Preprocessed test case, bzip2'd
out.i attached here.
Reduced into: /* { dg-do run } */ /* { dg-options "-O2 -fomit-frame-pointer" } */ /* { dg-options "-O2 -fomit-frame-pointer -march=i386" { target i?86-*-* } } */ extern void abort (void); extern void exit (int); struct S { int *a; unsigned char *b, c; }; int v; void foo (unsigned short x) { } int bar (struct S **x, int *y) { *y = 25; return 0; } int baz (struct S **x) { struct S *y = *x; unsigned char *a = y->b; foo (*a); if (__builtin_expect (y->c != 0 || y->a == &v, 0)) return 1; if (__builtin_expect (*a == 1, 0)) { int a, b = bar (x, &a); if (a) return b; } return 0; } int main (void) { struct S a, *b = &a; unsigned char c; __builtin_memset (b, 0, sizeof (a)); a.a = &v; a.b = &c; if (baz (&b) != 1) abort (); exit (0); } Seems to be broken on gcc-3_2-rhl8-branch and fixed on gcc-3_3-rhl-branch. |