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

            Bug ID: 33856
           Summary: clang ignores #pragma CX_LIMITED_RANGE
           Product: clang
           Version: 3.8
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: smcal...@gmail.com
                CC: llvm-bugs@lists.llvm.org

At least on clang 3.8.0-2 (Ubuntu 16.04), this code:

//#pragma CX_LIMITED_RANGE on

#include <stdio.h>
#include <stdlib.h>
#include <complex.h>

int main() {
    float complex a = rand() + I*rand();
    float complex b = rand() + I*rand();
    float complex c = a*b;
    printf("res: %f,%f\n", __real__ c, __imag__ c);
}

generates identical assembly with and without the pragma on.  I'm not sure the
implementation is _required_ to simplify complex arithmetic with it on, but I
think that's the spirit of the standard.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to