[llvm-bugs] [Bug 36507] New: Floating point varargs are not handled correctly with -mno-implicit-float

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Feb 25 02:16:49 PST 2018


            Bug ID: 36507
           Summary: Floating point varargs are not handled correctly with
           Product: clang
           Version: 5.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: grahamamacdonald at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 19952
  --> https://bugs.llvm.org/attachment.cgi?id=19952&action=edit
Test case for no-implicit-float/vararg bug

If I build the attached code with:
  'clang -mno-implicit-float vartest.c -o vartest'
the double 'd' is printed as 0.0 - it's not saved into the va_list.

If I build the attached code without -mno-implicit-float:
  'clang vartest.c -o vartest'
it runs as expected, and prints d: 2.300000.  In this case the double has been
correctly saved into the va_list.

I would argue that this case shouldn't be affected by the no-implicit-float
flag and should succeed.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180225/f75bf9ee/attachment.html>

More information about the llvm-bugs mailing list