testsuite: Run array54.C only for sync_int_long targets

Message ID 20240806191636.799766-1-dimitar@dinux.eu
State New
Headers
Series testsuite: Run array54.C only for sync_int_long targets |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gcc_check--master-arm success Test passed
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 success Test passed

Commit Message

Dimitar Dimitrov Aug. 6, 2024, 7:16 p.m. UTC
  The test case uses "atomic<int>", which fails to link on
pru-unknown-elf target due to missing __atomic_load_4 symbol.

Fix by filtering for sync_int_long effective target.  Ensured that the
test still passes for x86_64-pc-linux-gnu.

Ok for master?

gcc/testsuite/ChangeLog:

	* g++.dg/init/array54.C: Require sync_int_long effective target.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
---
 gcc/testsuite/g++.dg/init/array54.C | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Dimitar Dimitrov Aug. 24, 2024, 5:51 p.m. UTC | #1
On Tue, Aug 06, 2024 at 10:16:36PM +0300, Dimitar Dimitrov wrote:
> The test case uses "atomic<int>", which fails to link on
> pru-unknown-elf target due to missing __atomic_load_4 symbol.
> 
> Fix by filtering for sync_int_long effective target.  Ensured that the
> test still passes for x86_64-pc-linux-gnu.
> 
> Ok for master?

Ping.

> 
> gcc/testsuite/ChangeLog:
> 
> 	* g++.dg/init/array54.C: Require sync_int_long effective target.
> 
> Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
> ---
>  gcc/testsuite/g++.dg/init/array54.C | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/gcc/testsuite/g++.dg/init/array54.C b/gcc/testsuite/g++.dg/init/array54.C
> index 5241e451d6d..d664b576984 100644
> --- a/gcc/testsuite/g++.dg/init/array54.C
> +++ b/gcc/testsuite/g++.dg/init/array54.C
> @@ -1,6 +1,7 @@
>  // PR c++/90947
>  // { dg-do run { target c++11 } }
>  // { dg-require-effective-target thread_fence }
> +// { dg-require-effective-target sync_int_long }
>  
>  #include <atomic>
>  
> -- 
> 2.45.2
>
  
Jeff Law Aug. 25, 2024, 1:45 p.m. UTC | #2
On 8/24/24 11:51 AM, Dimitar Dimitrov wrote:
> On Tue, Aug 06, 2024 at 10:16:36PM +0300, Dimitar Dimitrov wrote:
>> The test case uses "atomic<int>", which fails to link on
>> pru-unknown-elf target due to missing __atomic_load_4 symbol.
>>
>> Fix by filtering for sync_int_long effective target.  Ensured that the
>> test still passes for x86_64-pc-linux-gnu.
>>
>> Ok for master?
> 
> Ping.
> 
>>
>> gcc/testsuite/ChangeLog:
>>
>> 	* g++.dg/init/array54.C: Require sync_int_long effective target.
OK
jeff
  

Patch

diff --git a/gcc/testsuite/g++.dg/init/array54.C b/gcc/testsuite/g++.dg/init/array54.C
index 5241e451d6d..d664b576984 100644
--- a/gcc/testsuite/g++.dg/init/array54.C
+++ b/gcc/testsuite/g++.dg/init/array54.C
@@ -1,6 +1,7 @@ 
 // PR c++/90947
 // { dg-do run { target c++11 } }
 // { dg-require-effective-target thread_fence }
+// { dg-require-effective-target sync_int_long }
 
 #include <atomic>