> From: Dimitar Dimitrov <dimi...@dinux.eu>
> Date: Tue, 14 Nov 2023 22:00:14 +0200

> The -w option was used in gcc.dg/20020206-1.c to ignore warnings if the
> '-fprefetch-loop-arrays' option is not supported by target.
> 
> When commit r14-5380-g5c432b0efab54e removed the -w option, some targets
> (arm-none-eabi, pru and possibly others) started failing the test:

(FWIW, all targets that don't implement and enable a
"prefetch" insn pattern.)

>   cc1: warning: '-fprefetch-loop-arrays' not supported for this target
>   FAIL: gcc.dg/20020206-1.c (test for excess errors)
> 
> Fix by instructing DejaGnu to prune the '-fprefetch-loop-arrays'
> warning.
> 
> Pushed to trunk as an obvious fix.

Another obvious fix would be to reinstate the removed -w (as
it remains on other tests passing -fprefetch-loop-arrays).

A fix I now don't have to commit, so thanks!

A much less obvious but IMHO also valid fix, would be to
remove the warning (but then for all users), as the option
is not documented to emit a warning and it appears there are
no tests for the warning.  The documentation says "If
supported by the target machine, generate instructions to
prefetch memory" with no further description on specifics of
what happens when it's not supported.  But, such a change
can always have non-obvious fallout.

brgds, H-P

Reply via email to