https://llvm.org/bugs/show_bug.cgi?id=23490

            Bug ID: 23490
           Summary: wrong code at -O1 and higher
           Product: libraries
           Version: 3.5
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Loop Optimizer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Created attachment 14313
  --> https://llvm.org/bugs/attachment.cgi?id=14313&action=edit
Sources archive

The attached program, which is a part of DNS zone file parser, behaves
differently if compiled with the optimization -O1 or higher. The source code
was generated with Ragel (option -G2) and is relatively large.

Caution: The compilation takes some minutes!

(For the comparison, I have also attached slightly reduced variant of the
parser which is compiled without any problems also with -O1.)

Examples:
OK:
$ clang ./scanner.c -o scanner-O0 -O0 -lm
$ ./scanner-O0
OWNER=00
CLASS=0001
RRTTL=0000012C
RTYPE=0001
RDATA=01020304
== OK ==

Not OK:
$ clang ./scanner.c -o scanner-O1 -O1 -lm
$ ./scanner-O1
== OK ==

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to