Commit e103201
committed
[flang][docs] Add note about Cray pointers and the TARGET attribute
We found some tests checking for loops assigning between Cray pointer
handles and their pointees which produced "incorrect" results with
optimizations enabled; this is because the compiler expects Cray
pointers not to alias with any other entity.
The HPE documentation for Cray Fortran extensions specifies:
> the compiler assumes that the storage of a pointee is
> never overlaid on the storage of another variable
Jean pointed out that if a user's code uses entities that alias
via Cray pointers, they may add the TARGET attribute to inform Flang
of this aliasing, but that Flang's behavior is inline with Cray's own
documentation and we should not make any changes to our alias analysis
to try and detect this case.
Updating documentation so that users that encounter this situation
have a way to allow their code to compile as they intend.1 parent 8e4dd21 commit e103201
1 file changed
+23
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
268 | | - | |
269 | 267 | | |
270 | | - | |
271 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
272 | 291 | | |
273 | 292 | | |
274 | 293 | | |
| |||
0 commit comments