[llvm-bugs] [Bug 26969] New: FP exception when optimized; code relocation implicated

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 16 17:57:38 PDT 2016


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

            Bug ID: 26969
           Summary: FP exception when optimized; code relocation
                    implicated
           Product: clang
           Version: 3.7
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: richard.brandt at autodesk.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16047
  --> https://llvm.org/bugs/attachment.cgi?id=16047&action=edit
Source code, Makefile, README.TXT explaining issue.

You guys do great work!

Floating point exception due to unexpected code relocation, for all
optimization
levels greater than -O0.

This occurs in a C translation of the Fortran LAPACK numerical library.

We show a floating point overflow runtime exception which occurs due to
pre-evaluation of the expression "bignum * cnorm" in line 258 of dlaln2.c.

The overflow occurs because the cnorm variable is greater than 1.  A following
if test checks the value of cnorm and should prevent the multiplication when 
cnorm is greater than 1.

We'd like to know the LLVM compiler team's opinions:
* Is this a compiler bug?  It seems that way to us.  Previous versions of Xcode
  did not produce the exception.  We're using Xcode 7.1.
* If this is not a compiler bug, what is the rationale for allowing code
  relocations which disregard tests of the operands?
* Is there a compiler command line option which we can set to disable the
  specific optimization which causes the code relocation?

THANKS!!
Rich Brandt

-- 
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/20160317/44a06eb0/attachment.html>


More information about the llvm-bugs mailing list