This is the mail archive of the 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 c/29592] New: Unending loops

After compilation test1.c with -O2 program loops unending.. Yeah I know is
possible cause -fstrict-aliasing and program works compilated with -O2 &&
It works too if it was compilated just only with -fstrict-aliasing so it loops
when some other optimization was turned on.

It works too (not loops unending) if in loop while (* ((char *) str))
we `printf("0x%x\n", str);` (maybe some other code which evaluate and use that
exp works too, i don't really know) [test2.c]

If it's not gcc bug, I'm really sorry inconvience.. (something code like that
was used in ekg2 

while (__S(str, 0)) {           /* while (*str)  */
        __SN(&str, 1);                  /* str++ */
loops unending, however if __SN() was declared not inline it works... for me it
was really strange, in testcases keyword 'inline' doesn't change behavior.

If it's not gcc bug, but mine, once again i'm really sorry... Sorry for me
English too.

testcase tested with:
gcc (GCC) 4.1.1 (Gentoo 4.1.1-r1)
gcc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
gcc (GCC) 4.1.0 (SUSE Linux)

           Summary: Unending loops
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: darkjames at darkjames dot ath dot cx
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

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