Hi PA,
Paul-Antoine Arras wrote:
What about the attached testcase?
Why not?
However, I was more thinking of defining two
format labels or two branch targets with the same value,
which gives a different error.
But also mixing branch target and format label works
and in terms of metadirectives, both test the same code,
only diverging in some old code.
* * *
I get the following diagnostics:
(I sorted them by line)
```
17 | 1345 print *, 'nested'
Error: Label 1345 at (1) already referenced as a format label
Error: Label 1345 at (1) already referenced as a format label
/home/parras/dev/openacc-mainline/src/gcc-mainline/gcc/testsuite/gfortran.dg/gomp/pr122508-2.f90:21:15:
20 | write(*,1345) cnt
Error: Label 1345 at (1) previously used as branch target
Error: Label 1345 at (1) previously used as branch target
21 | write(*,6789) cnt
Error: Label 6789 at (1) previously used as branch target
Error: Label 6789 at (1) previously used as branch target
Error: Label 6789 at (1) previously used as branch target
```
Are those the expected diagnostics?
If yes, we still have a duplication problem due to several copies of
the same label coexisting in different metadirective regions.
While it would be nicer to have the message only once
and not twice or thrice, the message is perfectly valid.
In any case, the user gets a message an can fix his/her
code.
Thus, I think we can package it - just by adding the
three 'dg-error' that should also match multiple occurrences
of the same error.
Thanks,
Tobias