[LLVMbugs] [Bug 3589] New: clang with -O2 generates some strange "puts" call

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Feb 15 11:40:28 PST 2009


http://llvm.org/bugs/show_bug.cgi?id=3589

           Summary: clang with -O2 generates some strange "puts" call
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rdivacky at freebsd.org
                CC: llvmbugs at cs.uiuc.edu


when compiling the attached with -O2 there is a strange call to "puts"
generated which is not generated at -O0

lev /tmp$ /usr/local/bin/ccc -S -O2 -ffreestanding imgact_shell.c && grep puts
imgact_shell.s
ccc: Unknown host 'freebsd', using generic host information.
        call    puts
lev /tmp$ /usr/local/bin/ccc -S -ffreestanding imgact_shell.c && grep puts
imgact_shell.s
ccc: Unknown host 'freebsd', using generic host information.
lev /tmp$ 


there is no such thing as "puts" in the source:

lev /tmp$ grep -c puts imgact_shell.c 
0

there is similar case with "putchar" but I dont have a test case for that. this
is likely coming from llvm optimizations or something, feel free to reassign


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list