[llvm-bugs] [Bug 49479] New: File scope #pragma clang fp reassociate does not propagate to functions defined within structs
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Mar 8 12:07:54 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=49479
Bug ID: 49479
Summary: File scope #pragma clang fp reassociate does not
propagate to functions defined within structs
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C
Assignee: unassignedclangbugs at nondot.org
Reporter: melanie.blower at intel.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
I received this bug report by email,
https://godbolt.org/z/1KnfbE
In this example, #pragma clang fp reassociate on line 1 is applied in a global
scope; however, you will notice that there's no "reassoc" notation in the fadd
operation for struct MyComplex.
Similarly, applying the pragma right above the struct declaration like
MyComplex3 will not work either.
The only working case is to add it in the add operation right above the return
statement, as you can see in MyComplex2.
--
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/20210308/bb263e2c/attachment.html>
More information about the llvm-bugs
mailing list