Commit 5696ecd
committed
[flang] Don't warn on (0.,0.)**(nonzero noninteger)
Folding hands complex exponentiations with constant arguments off to
the native libm, and on a least on host, this can produce spurious
warnings about division by zero and invalid arguments. Handle
the case of a zero base specially to avoid that, and also emit
better warnings for the undefined 0.**0 and (0.,0.)**0 cases.
And add a test for these warnings and the existing related ones.1 parent 5eb24fd commit 5696ecd
File tree
3 files changed
+26
-2
lines changed- flang
- include/flang/Evaluate
- lib/Evaluate
- test/Semantics
3 files changed
+26
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2156 | 2156 | | |
2157 | 2157 | | |
2158 | 2158 | | |
2159 | | - | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
2160 | 2167 | | |
2161 | 2168 | | |
2162 | 2169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments