On Tue, Feb 17, 2026 at 02:44:11PM -0800, Andrew Pinski wrote:
> This will be used in my next patch but the idea is
> there is a common location for aarch64 specific testcases
> that should be tested with both the C and C++ front-ends.
> 
> Tested on aarch64-linux-gnu.
> 
> gcc/testsuite/ChangeLog:
> 
>       * g++.target/aarch64/aarch64.exp: Look into
>       * gcc.target/aarch64/aarch64.exp:
>       * c-c++-common/aarch64/test-1.c: New test.

I like the concept, but I don't see any precedent for putting
architecture-specific tests in c-c++-common.
Might it be better to take a similar approach to that in
g++.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp?

Alice

> 
> Signed-off-by: Andrew Pinski <[email protected]>
> ---
>  gcc/testsuite/c-c++-common/aarch64/test-1.c  | 7 +++++++
>  gcc/testsuite/g++.target/aarch64/aarch64.exp | 2 ++
>  gcc/testsuite/gcc.target/aarch64/aarch64.exp | 2 ++
>  3 files changed, 11 insertions(+)
>  create mode 100644 gcc/testsuite/c-c++-common/aarch64/test-1.c
> 
> diff --git a/gcc/testsuite/c-c++-common/aarch64/test-1.c 
> b/gcc/testsuite/c-c++-common/aarch64/test-1.c
> new file mode 100644
> index 00000000000..40a5e156d8c
> --- /dev/null
> +++ b/gcc/testsuite/c-c++-common/aarch64/test-1.c
> @@ -0,0 +1,7 @@
> +/* { dg-do compile } */
> +/* Just to test that c-c++-common tests work */
> +
> +int main(void)
> +{
> +   return 0;
> +}
> diff --git a/gcc/testsuite/g++.target/aarch64/aarch64.exp 
> b/gcc/testsuite/g++.target/aarch64/aarch64.exp
> index 730e1688907..9e859f0d682 100644
> --- a/gcc/testsuite/g++.target/aarch64/aarch64.exp
> +++ b/gcc/testsuite/g++.target/aarch64/aarch64.exp
> @@ -38,6 +38,8 @@ dg-init
>  # Main loop.
>  dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C]] \
>          "" $DEFAULT_CXXFLAGS
> +dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/aarch64/*.c]] \
> +        "" $DEFAULT_CXXFLAGS
>  
>  # All done.
>  dg-finish
> diff --git a/gcc/testsuite/gcc.target/aarch64/aarch64.exp 
> b/gcc/testsuite/gcc.target/aarch64/aarch64.exp
> index 11c61d4b7e9..7d690e5d81c 100644
> --- a/gcc/testsuite/gcc.target/aarch64/aarch64.exp
> +++ b/gcc/testsuite/gcc.target/aarch64/aarch64.exp
> @@ -41,6 +41,8 @@ aarch64-with-arch-dg-options "" {
>      # Main loop.
>      dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \
>           "" $DEFAULT_CFLAGS
> +    dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/aarch64/*.c]] \
> +          " -Wc++-compat " ""
>  }
>  # All done.
>  dg-finish
> -- 
> 2.43.0
> 

Reply via email to