Issue 141119
Summary [flang] Incorrect shape of the result of intrinsic SPREAD
Labels flang:frontend
Assignees
Reporter DanielCChen
    Consider the following code:
```
real :: arr
print*, shape(spread(arr, 1, -1))
end
```

Flang produces `-1`. 
However, the standard says: 
```
Case (i): If SOURCE is scalar, the shape of the result is (MAX (NCOPIES, 0)).
```

`NCOPIES` is `-1` in this case, so the shape should be `0`. 
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to