On Sep 20 2025, Thomas Koenig wrote:
> Hi Andreas,
>
>> On Sep 20 2025, Thomas Koenig via Gcc wrote:
>>
>>> I can live with that, but it seems a little strange - is there a
>>> way to check for an error message that is not associated with
>>> a particular line number?
>> Use zero as the line number (like gcc.dg/Wfatal-2.c).
>
> I tried to do that, but there is still a mystery. My test
> case now is
>
> ! { dg-do compile }
> ! { dg-options "-ffrontend-optimize -fexternal-blas64" }
> ! { dg-require-effective-target ilp32 }
> ! { dg-error "-fexternal-blas64 requires a 64-bit system"
> "matmul_blas_4.f90" { target *-*-* } 0 }
> ! { dg-error "compilation terminated" "compilation terminated" { target
> *-*-* } 0 }
I wrote "like gcc.dg/Wfatal-2.c" for a reason, it contains the correct
answer to your question.
! { dg-message "compilation terminated" "compilation terminated" { target *-*-*
} 0 }
--
Andreas Schwab, [email protected]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."