Re: egcs-1.1.2 ping bug also causes miscompilation of pcbit isdn driver

Tygrys (tygrys@tygrys.eu.org)
Sun, 13 Jun 1999 18:37:49 +0200


Lars Heete wrote:

> --------------------- test case ----------------------
> #include <stdio.h>
> int main(int argc, char **argv) {
> struct {char c1, c2, c2, 4;} t;
> t.c4 = 0x78; t.c3 = 0x56; t.c2 = 0x34; t.c1 = 0x12;
> printf("0x%x\n", *((unsigned long*) &t));
> return 0;
> }
>
> gives 0x12 with egcs-1.1.2 on i386, instead of 0x78563412.
But only when compiled with optimization...

-- 
Greetz,
  Tygrys [161-Tango Delta Echo-002] - at 27MHz
                                           if I have a bad day, ;-)
  ("`-''-/").___..--''"`-._         TyGrYs *** ExPeCt No MeRcY! *** 
   `6_ 6  )   `-.  (     ).`-._-.       KSS Network Administrator
   (_Y_.)'  ._   )  `._ `. "-..'        http://www.tygrys.eu.org/
  _..`--'_..-_/ /--'_.'_,'        ICQ:3297597 LU156-NIC 2:484/53@fidonet 
 ((('   (((-(((''  ((((           Linux Forever!!!        Member of JTZ

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/