arm: Fix the warning -mcpu=cortex-m55 conflicting with -march=armv8.1-m.main (pr97327).
authorSrinath Parvathaneni <srinath.parvathaneni@arm.com>
Fri, 16 Oct 2020 13:53:28 +0000 (14:53 +0100)
committerSrinath Parvathaneni <srinath.parvathaneni@arm.com>
Fri, 16 Oct 2020 13:53:40 +0000 (14:53 +0100)
commit90042c43a92c452a5f9f3afbfcdad511ea09a54f
treeffb38fd53681df7203601c5ecd05d595881bd37c
parent6c6e0cafa38cee8309f37b846cb7db813a472a54
arm: Fix the warning -mcpu=cortex-m55 conflicting with -march=armv8.1-m.main (pr97327).

This patch fixes (PR97327) the warning -mcpu=cortex-m55 conflicts with -march=armv8.1-m.main
for -mfloat-abi=soft by adding the isa_bit_mve_float to clearing FP bit list.

The following combination are fixed with this patch:
$ cat bug.c
int main(){
return 0;
}

$ arm-none-eabi-gcc -mcpu=cortex-m55 -mfloat-abi=soft bug.c -c
$ arm-none-eabi-gcc -mcpu=cortex-m55 -mfloat-abi=soft -march=armv8.1-m.main+mve bug.c -c

Before this patch for above combinations:
cc1: warning: switch '-mcpu=cortex-m55' conflicts with '-march=armv8.1-m.main' switch

After this patch for above combinations no warning/errors.

gcc/ChangeLog:

2020-10-16  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>

PR target/97327
* config/arm/arm.c (fp_bitlist): Add isa_bit_mve_float to FP bits array.

gcc/testsuite/ChangeLog:

PR target/97327
* gcc.target/arm/mve/intrinsics/pr97327.c: New test.
gcc/config/arm/arm.c
gcc/testsuite/gcc.target/arm/mve/intrinsics/pr97327.c [new file with mode: 0644]