https://gcc.gnu.org/g:b996304249f3eeeca2b797f73fb71e05f9621fa5
commit r15-5840-gb996304249f3eeeca2b797f73fb71e05f9621fa5 Author: Andrew Pinski <quic_apin...@quicinc.com> Date: Sat Nov 30 20:58:14 2024 -0800 testsuite: Fix sve-sizeless-[12].C for C++98 In C++98 `{ a }` for aggregates can only mean constructing by each element rather than a copy. This adds the expected error message for SVE vectors for C++98. Pushed as obvious after a test for aarch64-linux-gnu. gcc/testsuite/ChangeLog: * g++.dg/ext/sve-sizeless-1.C: Add error message for line 164 for C++98 only. * g++.dg/ext/sve-sizeless-2.C: Likewise. Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com> Diff: --- gcc/testsuite/g++.dg/ext/sve-sizeless-1.C | 2 +- gcc/testsuite/g++.dg/ext/sve-sizeless-2.C | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/g++.dg/ext/sve-sizeless-1.C b/gcc/testsuite/g++.dg/ext/sve-sizeless-1.C index 0d62bd7f39e9..37bcec1efb9f 100644 --- a/gcc/testsuite/g++.dg/ext/sve-sizeless-1.C +++ b/gcc/testsuite/g++.dg/ext/sve-sizeless-1.C @@ -161,7 +161,7 @@ statements (int n) svint8_t init_sve_sc3 = sve_sc1; svint8_t init_sve_sc4 = sve_sh1; // { dg-error {cannot convert 'svint16_t' to 'svint8_t'} } svint8_t init_sve_sc5 = {}; - svint8_t init_sve_sc6 = { sve_sc1 }; + svint8_t init_sve_sc6 = { sve_sc1 }; // { dg-error {cannot convert 'svint8_t' to 'signed char'} "" { target c++98_only } } svint8_t init_sve_sc7 = { sve_sh1 }; // { dg-error {cannot convert 'svint16_t' to 'signed char'} } svint32_t init_sve_vc1 = { 0, 1 }; svint32_t init_sve_vc2 = { 0, bar () }; diff --git a/gcc/testsuite/g++.dg/ext/sve-sizeless-2.C b/gcc/testsuite/g++.dg/ext/sve-sizeless-2.C index 51def2441df9..3243a17f6066 100644 --- a/gcc/testsuite/g++.dg/ext/sve-sizeless-2.C +++ b/gcc/testsuite/g++.dg/ext/sve-sizeless-2.C @@ -161,7 +161,7 @@ statements (int n) svint8_t init_sve_sc3 = sve_sc1; svint8_t init_sve_sc4 = sve_sh1; // { dg-error {cannot convert 'svint16_t' to 'svint8_t'} } svint8_t init_sve_sc5 = {}; - svint8_t init_sve_sc6 = { sve_sc1 }; + svint8_t init_sve_sc6 = { sve_sc1 }; // { dg-error {cannot convert 'svint8_t' to 'signed char'} "" { target c++98_only } } svint8_t init_sve_sc7 = { sve_sh1 }; // { dg-error {cannot convert 'svint16_t' to 'signed char'} } svint32_t init_sve_vc1 = { 0, 1 }; svint32_t init_sve_vc2 = { 0, bar () };