aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-01-25Fortran: ICE in gfc_compare_array_spec [PR108528]Steve Kargl2-2/+11
gcc/fortran/ChangeLog: PR fortran/108528 * array.cc (compare_bounds): Return false instead of generating an internal error on an invalid argument type. gcc/testsuite/ChangeLog: PR fortran/108528 * gfortran.dg/pr108528.f90: New test.
2023-01-25modula-2: Fixes for preprocessing [PR102343, PR108182].Iain Sandoe12-225/+619
Modula-2 uses the C preprocessor to implement handling for conditional code and macros. However, this is not done directly, because the process is applied recursively to imported definitions and modules. The cc1gm2 executable records the parameters as a template command line needed to create a composite 'cc1 -E' for each file to be preprocessed starting with the main file from the original command line. This patch fixes the capture of the C preprocessor template to include the target information needed for correct multilib operation. In order to match the existing semantics of '-E, -M and -MM' these have to be handled as a 'pre-processor only' job (i.e. the recursion is omitted and only the main file is processed). Whereas C-family front ends always pre-process, Modula-2 only does so when specifically requested (via the -fcpp option). '-MD, -MMD and -MQ' also require special handling, since (in principle) these options can be applied to any command line (with -fcpp) providing dependency information as a by-product. TODO: the preprocessor is not able to determine def and mod dependencies for Modula-2 and so the output of this only shows the object to module dep. We should be able to append the .def and .mod dependencies. The patch amends save-temps handling to cater for the preprocessor recursion and to avoid writing saved files into the source directories. The patch changes the extension for Modula-2 preprocessed source to .m2i to avoid clashes with .i. The main driver code is amended to add default handlers for .mod and .m2i so that a useful error message will be emitted if the Modula-2 compiler is not built-in. The compiler will now also handle code generation from a .m2i preprocessed source. TODO: We should not need to pass the '-c' option to the compiler to alter the processing of init code. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> PR modula2/102343 PR modula2/108182 gcc/ChangeLog: * gcc.cc: Provide default specs for Modula-2 so that when the language is not built-in better diagnostics are emitted for attempts to use .mod or .m2i file extensions. gcc/m2/ChangeLog: * gm2-compiler/M2Comp.mod: Early exit for pre-processor-only jobs. * gm2-compiler/M2Options.def (SetPPOnly, GetPPOnly, SetMD, GetMD, SetMMD, GetMMD, SetMQ, GetMQ, SetObj, GetObj, SetDumpDir, GetDumpDir):New. * gm2-compiler/M2Options.mod:(SetPPOnly, GetPPOnly, SetMD, GetMD, SetMMD, GetMMD, SetMQ, GetMQ, SetObj, GetObj, SetDumpDir, GetDumpDir):New. * gm2-compiler/M2Preprocess.def (PreprocessModule): Add flag to indicate the main file. * gm2-compiler/M2Preprocess.mod: Handle Preprocess-only jobs, handle MD, MMD and MQ options. * gm2-gcc/m2options.h (M2Options_SetPPOnly, M2Options_GetPPOnly, M2Options_SetDumpDir, M2Options_SetMD, M2Options_GetMD, M2Options_SetMMD, M2Options_GetMMD, M2Options_SetMQ, M2Options_GetMQ, M2Options_SetObj, M2Options_GetObj): New. * gm2-gcc/m2type.cc (m2type_InitBaseTypes): Early exit for pre- processor-only jobs. * gm2-lang.cc (gm2_langhook_init): Handle preprocess-only commands. (gm2_langhook_option_lang_mask): Claim C and Driver options so that we can intercept them for building pre-processor commands. (gm2_langhook_init_options): Collect the preprocessor line here. Save options that have different actions for preprocessor and compile commands. (gm2_langhook_handle_option): Only handle the modula-2 options here. (gm2_langhook_post_options): Do not create a back-end for pre- processor-only jobs. * gm2spec.cc (lang_specific_driver): Ignore PCH options, append a scaffold-main for cases where we are building a main module with -c. * lang-specs.h: Revise to handle preprocessor-only jobs and to consume pre-processed files. * lang.opt: Remove Driver and C options copies (we claim these separately).
2023-01-25c++: Fix up mangling of static lambdas [PR108525]Jakub Jelinek2-1/+6
Before the P1169R4 changes, operator () of a lambda was always a method, so it was fine to pass method_p = 1 unconditionally, but it isn't always the case, so this patch adds a check for whether it is a method or nor. 2023-01-25 Jakub Jelinek <jakub@redhat.com> PR c++/108525 * mangle.cc (write_closure_type_name): Don't assume all lambda operator() fns are methods. * g++.dg/cpp23/static-operator-call5.C: New test.
2023-01-25arm: fix missing extern "C" in MVE testsAndrea Corallo85-0/+680
gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vhaddq_n_s16.c: Add missing extern "C". * gcc.target/arm/mve/intrinsics/vhaddq_n_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_n_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_n_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_n_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_n_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_x_n_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_x_n_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_x_n_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_x_n_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_x_n_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_x_n_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_x_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_x_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_x_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_x_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_x_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vhaddq_x_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_n_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_n_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_n_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_n_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_n_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_n_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_x_n_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_x_n_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_x_n_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_x_n_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_x_n_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_x_n_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_x_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_x_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_x_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_x_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_x_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vhsubq_x_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmladavaxq_p_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmladavaxq_p_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vmladavaxq_p_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmladavaxq_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmladavaxq_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vmladavaxq_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vqaddq_n_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vqaddq_n_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqaddq_n_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vqaddq_n_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vqaddq_n_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqaddq_n_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vqaddq_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vqaddq_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqaddq_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vqaddq_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vqaddq_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqaddq_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmlahq_n_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmlahq_n_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmlahq_n_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmlashq_m_n_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmlashq_m_n_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmlashq_m_n_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmlashq_n_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmlashq_n_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmlashq_n_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vsetq_lane_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vsetq_lane_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vsetq_lane_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vsetq_lane_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vsetq_lane_s64.c: Likewise. * gcc.target/arm/mve/intrinsics/vsetq_lane_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vsetq_lane_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vsetq_lane_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vsetq_lane_u64.c: Likewise. * gcc.target/arm/mve/intrinsics/vsetq_lane_u8.c: Likewise.
2023-01-25arm: improve tests for vld2q*Andrea Corallo8-40/+224
gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vld2q_f16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vld2q_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vld2q_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vld2q_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vld2q_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vld2q_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vld2q_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vld2q_u8.c: Likewise.
2023-01-25arm: improve tests and fix vqnegq*Andrea Corallo7-18/+159
gcc/ChangeLog: * config/arm/mve.md (mve_vqnegq_s<mode>): Fix spacing. gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vqnegq_m_s16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vqnegq_m_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqnegq_m_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vqnegq_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vqnegq_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqnegq_s8.c: Likewise.
2023-01-25arm: improve tests for vqrdmulhq*Andrea Corallo12-36/+312
gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vqrdmulhq_m_n_s16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vqrdmulhq_m_n_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmulhq_m_n_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmulhq_m_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmulhq_m_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmulhq_m_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmulhq_n_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmulhq_n_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmulhq_n_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmulhq_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmulhq_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmulhq_s8.c: Likewise.
2023-01-25arm: improve tests for vqrdmlsdhxq*Andrea Corallo6-18/+156
gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vqrdmlsdhxq_m_s16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vqrdmlsdhxq_m_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmlsdhxq_m_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmlsdhxq_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmlsdhxq_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmlsdhxq_s8.c: Likewise.
2023-01-25arm: improve tests for vqrdmlsdhq*Andrea Corallo6-18/+156
gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vqrdmlsdhq_m_s16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vqrdmlsdhq_m_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmlsdhq_m_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmlsdhq_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmlsdhq_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmlsdhq_s8.c: Likewise.
2023-01-25arm: improve tests for vqdmlsdhxq*Andrea Corallo6-18/+156
gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vqdmlsdhxq_m_s16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vqdmlsdhxq_m_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmlsdhxq_m_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmlsdhxq_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmlsdhxq_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmlsdhxq_s8.c: Likewise.
2023-01-25arm: improve tests for vqdmlsdhq*Andrea Corallo6-18/+156
gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vqdmlsdhq_m_s16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vqdmlsdhq_m_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmlsdhq_m_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmlsdhq_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmlsdhq_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmlsdhq_s8.c: Likewise.
2023-01-25arm: improve tests for vqrdmlashq*Andrea Corallo3-18/+78
gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vqrdmlashq_n_s16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vqrdmlashq_n_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmlashq_n_s8.c: Likewise.
2023-01-25arm: improve tests for vqrdmladhxq*Andrea Corallo6-18/+156
gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vqrdmladhxq_m_s16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vqrdmladhxq_m_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmladhxq_m_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmladhxq_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmladhxq_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmladhxq_s8.c: Likewise.
2023-01-25arm: improve tests for vqrdmladhq*Andrea Corallo6-18/+156
gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vqrdmladhq_m_s16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vqrdmladhq_m_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmladhq_m_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmladhq_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmladhq_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqrdmladhq_s8.c: Likewise.
2023-01-25arm: improve tests for vqdmladhxq*Andrea Corallo6-18/+156
gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vqdmladhxq_m_s16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vqdmladhxq_m_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmladhxq_m_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmladhxq_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmladhxq_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmladhxq_s8.c: Likewise.
2023-01-25arm: improve tests for vqdmladhq*Andrea Corallo6-18/+156
gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vqdmladhq_m_s16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vqdmladhq_m_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmladhq_m_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmladhq_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmladhq_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqdmladhq_s8.c: Likewise.
2023-01-25arm: improve tests and fix vqabsq*Andrea Corallo7-20/+161
gcc/ChangeLog: * config/arm/mve.md (mve_vqabsq_s<mode>): Fix spacing. gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vqabsq_m_s16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vqabsq_m_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqabsq_m_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vqabsq_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vqabsq_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vqabsq_s8.c: Likewise.
2023-01-25arm: improve tests for vcmulq*Andrea Corallo24-74/+656
gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vcmulq_f16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vcmulq_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_m_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_m_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_rot180_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_rot180_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_rot180_m_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_rot180_m_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_rot180_x_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_rot180_x_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_rot270_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_rot270_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_rot270_m_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_rot270_m_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_rot270_x_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_rot270_x_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_rot90_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_rot90_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_rot90_m_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_rot90_m_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_rot90_x_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_rot90_x_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_x_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmulq_x_f32.c: Likewise.
2023-01-25arm: improve tests for vcmlaq*Andrea Corallo16-48/+416
gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vcmlaq_f16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vcmlaq_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmlaq_m_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmlaq_m_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmlaq_rot180_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmlaq_rot180_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmlaq_rot180_m_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmlaq_rot180_m_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmlaq_rot270_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmlaq_rot270_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmlaq_rot270_m_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmlaq_rot270_m_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmlaq_rot90_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmlaq_rot90_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmlaq_rot90_m_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmlaq_rot90_m_f32.c: Likewise.
2023-01-25arm: improve tests for vcaddq*Andrea Corallo48-144/+1312
gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vcaddq_rot270_f16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_m_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_m_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_m_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_m_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_m_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_m_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_m_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_m_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_x_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_x_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_x_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_x_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_x_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_x_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_x_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot270_x_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_m_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_m_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_m_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_m_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_m_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_m_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_m_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_m_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_x_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_x_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_x_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_x_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_x_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_x_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_x_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcaddq_rot90_x_u8.c: Likewise.
2023-01-25arm: improve tests for vmulltq*Andrea Corallo24-72/+656
gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vmulltq_int_m_s16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vmulltq_int_m_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_int_m_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_int_m_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_int_m_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_int_m_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_int_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_int_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_int_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_int_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_int_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_int_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_int_x_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_int_x_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_int_x_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_int_x_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_int_x_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_int_x_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_poly_m_p16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_poly_m_p8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_poly_p16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_poly_p8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_poly_x_p16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulltq_poly_x_p8.c: Likewise.
2023-01-25arm: improve tests for vmullbq*Andrea Corallo24-72/+656
gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vmullbq_int_m_s16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vmullbq_int_m_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_int_m_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_int_m_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_int_m_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_int_m_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_int_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_int_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_int_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_int_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_int_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_int_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_int_x_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_int_x_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_int_x_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_int_x_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_int_x_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_int_x_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_poly_m_p16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_poly_m_p8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_poly_p16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_poly_p8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_poly_x_p16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmullbq_poly_x_p8.c: Likewise.
2023-01-25arm: improve tests for vmulhq*Andrea Corallo18-54/+492
gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vmulhq_m_s16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vmulhq_m_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulhq_m_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulhq_m_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulhq_m_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulhq_m_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulhq_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulhq_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulhq_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulhq_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulhq_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulhq_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulhq_x_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulhq_x_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulhq_x_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulhq_x_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulhq_x_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vmulhq_x_u8.c: Likewise.
2023-01-25arm: improve tests and fix vnegq*Andrea Corallo18-47/+433
gcc/ChangeLog: * config/arm/mve.md (mve_vnegq_f<mode>, mve_vnegq_s<mode>): Fix spacing. gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vnegq_f16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vnegq_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vnegq_m_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vnegq_m_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vnegq_m_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vnegq_m_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vnegq_m_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vnegq_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vnegq_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vnegq_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vnegq_x_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vnegq_x_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vnegq_x_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vnegq_x_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vnegq_x_s8.c: Likewise. * gcc.target/arm/simd/mve-vneg.c: Update test. * gcc.target/arm/simd/mve-vshr.c: Likewise
2023-01-25arm: improve tests and fix vclzq*Andrea Corallo20-62/+506
gcc/ChangeLog: * config/arm/mve.md (@mve_vclzq_s<mode>): Fix spacing. gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vclzq_m_s16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vclzq_m_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vclzq_m_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vclzq_m_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vclzq_m_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vclzq_m_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vclzq_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vclzq_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vclzq_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vclzq_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vclzq_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vclzq_u8.c: Likewise. * gcc.target/arm/mve/intrinsics/vclzq_x_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vclzq_x_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vclzq_x_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vclzq_x_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vclzq_x_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vclzq_x_u8.c: Likewise. * gcc.target/arm/simd/mve-vclz.c: Update test.
2023-01-25arm: improve tests and fix vclsq*Andrea Corallo10-29/+251
gcc/ChangeLog: * config/arm/mve.md (mve_vclsq_s<mode>): Fix spacing. gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/vclsq_m_s16.c: Use check-function-bodies instead of scan-assembler checks. Use extern "C" for C++ testing. * gcc.target/arm/mve/intrinsics/vclsq_m_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vclsq_m_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vclsq_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vclsq_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vclsq_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vclsq_x_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vclsq_x_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vclsq_x_s8.c: Likewise.
2023-01-25tree-optimization/108523 - fix endless iteration in VNRichard Biener1-3/+11
The following fixes not converging iteration in value-numbering of PHI nodes when we use an equivalence to prove the PHI node is degenerate. We have to avoid the situation where we oscillate between the two equivalent values because the result is fed back via a backedge. PR tree-optimization/108523 * tree-ssa-sccvn.cc (visit_phi): Avoid using the exclusive backedge value for the result when using predication to prove equivalence.
2023-01-25Fixup LTO internal docs for option processingRichard Biener1-7/+5
Andreas noticed that when I removed lto_read_all_file_options I failed to update the internals manual which refers to it. The following attempts to reflect the current situation. * doc/lto.texi (Command line options): Reword and update reference to removed lto_read_all_file_options.
2023-01-25aarch64: Restore generation of SVE UQDEC instructionsRichard Sandiford1-2/+3
The addition of TARGET_CSSC meant that we wouldn't generate SVE UQDEC instructions unless +cssc was also enabled. Fixes: - gcc.target/aarch64/sve/slp_4.c - gcc.target/aarch64/sve/slp_10.c - gcc.target/aarch64/sve/while_4.c gcc/ * config/aarch64/aarch64.md (umax<mode>3): Separate the CNT and CSSC tests.
2023-01-25aarch64: Update sizeless testsRichard Sandiford2-4/+2
The sizeless-*.c tests contained (deliberately) invalid constructors that had two errors. The first error now suppresses the second error, but the second error was the main focus of the test. This patch therefore rewrites it into a different form. gcc/testsuite/ * gcc.target/aarch64/sve/acle/general-c/sizeless-1.c: Avoid "initializer element is not constant" error. * gcc.target/aarch64/sve/acle/general-c/sizeless-2.c: Likewise.
2023-01-25doc/contrib.texi: Add Jose E. MarchesiGerald Pfeifer1-0/+4
gcc/ChangeLog: * doc/contrib.texi: Add Jose E. Marchesi.
2023-01-25aarch64: Add aarch64*-*-* to the list of vect_long_long targetsAndre Vieira1-1/+2
This patch adds aarch64 to the list of vect_long_long targets. Regression tested on aarch64-none-linux-gnu. gcc/testsuite/ChangeLog: * lib/target-supports.exp (check_effective_target_vect_long_long): Add aarch64 to list of targets supporting long long vectorization.
2023-01-25store-merging: Disable string_concatenate mode if start or end aren't byte ↵Jakub Jelinek3-2/+179
aligned [PR108498] The first of the following testcases is miscompiled on powerpc64-linux -O2 -m64 at least, the latter at least on x86_64-linux -m32/-m64. Since GCC 11 store-merging has a separate string_concatenation mode which turns stores into setting a MEM_REF from a STRING_CST. This mode is triggered if at least one of the to be merged stores is a STRING_CST store and either the first store (to earliest address) is that STRING_CST store or the first store is 8-bit INTEGER_CST store and then there are some rules when to turn that mode off or not merge further stores into it. The problem with these 2 testcases is that the actual implementation relies on start/width of the store to be at byte boundaries, as it simply creates a char array, MEM_REF can be only on byte boundaries and the char array too, plus obviously STRING_CST as well. But as can be easily seen in the second testcase, nothing verifies this, while the first store has to be a STRING_CST (which will be aligned) or 8-bit INTEGER_CST, that 8-bit INTEGER_CST store could be a bitfield store, nothing verifies any stores in between whether they actually are 8-bit and aligned, the only major requirement is that all the stores are consecutive. For GCC 14 I think we should reconsider this, simply treat STRING_CST stores during the merging like INTEGER_CST stores and deal with it only during split_group where we can create multiple parts, this part would be a normal store, this part would be STRING_CST store, this part another normal store etc. But that is quite a lot of work, the following patch just disables the string_concatenate mode if boundaries aren't byte aligned in the spot where we disable it if it is too short too. If that happens, we'll just try to do the merging using normal 1/2/4/8 etc. byte stores as usually with RMW masking for any bits that shouldn't be touched or punt if we end up with too many stores compared to the original. Note, an original STRING_CST store will count as one store in that case, something we might want to reconsider later too (but, after all, CONSTRUCTOR stores (aka zeroing) already have the same problem, they can be large and expensive and we still count them as one store). 2023-01-25 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/108498 * gimple-ssa-store-merging.cc (class store_operand_info): End coment with full stop rather than comma. (split_group): Likewise. (merged_store_group::apply_stores): Clear string_concatenation if start or end aren't on a byte boundary. * gcc.c-torture/execute/pr108498-1.c: New test. * gcc.c-torture/execute/pr108498-2.c: New test.
2023-01-24tree-optimization/108522 Use COMPONENT_REF offset when availableSiddhesh Poyarekar2-1/+19
Use the offset in TREE_OPERAND(component_ref, 2) when available instead of DECL_FIELD_OFFSET when trying to compute offset for a COMPONENT_REF. Co-authored-by: Jakub Jelinek <jakub@redhat.com> gcc/ChangeLog: PR tree-optimization/108522 * tree-object-size.cc (compute_object_offset): Use TREE_OPERAND(ref, 2) for COMPONENT_REF when available. gcc/testsuite/ChangeLog: PR tree-optimization/108522 * gcc.dg/builtin-dynamic-object-size-0.c (test_dynarray_struct_member): New test. (main): Call it. Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>
2023-01-25Daily bump.GCC Administrator8-1/+282
2023-01-24libstdc++: Use /etc/sysconfig/clock for std::chrono::current_zone() [PR108530]Jonathan Wakely1-2/+22
On some systems /etc/localtime is a tzfile, not a symlink to one. We cannot use it to determine the current time zone in that case. See if /etc/sysconfig/clock sets the variable DEFAULT_TIMEZONE instead. libstdc++-v3/ChangeLog: PR libstdc++/108530 * src/c++20/tzdb.cc (current_zone): Look for DEFAULT_TIMEZONE in /etc/sysconfig/clock.
2023-01-24libstdc++: Include std::ranges::subrange definition in <tuple> [PR102301]Jonathan Wakely4-5/+61
In order for std::make_from_tuple to work with tuple-like types, the overloads of std::get for those types must have been declared before the definition of std::make_from_tuple. That means we need to include the definition of std::ranges::subrange in <tuple>. The definitions of std::pair and its overloads of std::get are already included in <tuple>. We provide forward declarations of std::array and its std::get overloads in <tuple>. We could just declare subrange without defining it, and give ranges::get a non-deduced return type, like so: namespace ranges { enum class subrange_kind : bool { unsized, sized}; template<input_or_output_iterator I, sentinel_for<I> S, subrange_kind K> requires (K == subrange_kind::sized || !sized_sentinel_for<S, I>) class subrange; template<size_t _Num, class _It, class _Sent, subrange_kind _Kind> requires (_Num < 2) constexpr __conditional_t<_Num == 0, _It, _Sent> get(const subrange<_It, _Sent, _Kind>& __r); template<size_t _Num, class _It, class _Sent, subrange_kind _Kind> requires (_Num < 2) constexpr __conditional_t<_Num == 0, _It, _Sent> get(subrange<_It, _Sent, _Kind>&& __r) } using ranges::get; It is a bit late in the GCC 13 dev cycle to do this, so just include the right headers for now. Also add the dangling check to std::make_from_tuple added by P2255. libstdc++-v3/ChangeLog: PR libstdc++/102301 * include/bits/ranges_base.h: Include <bits/stl_iterator.h> for std::make_reverse_iterator. * include/std/tuple: Include <bits/ranges_util.h> for subrange. (make_from_tuple): Add static assertion from P2255 to diagnose dangling references. * testsuite/20_util/tuple/make_from_tuple/dangling_ref.cc: New test. * testsuite/20_util/tuple/make_from_tuple/tuple_like.cc: New test.
2023-01-25testsuite: Fix up new51.C test on various targets [PR108533]Jakub Jelinek1-2/+3
The test fails on targets where size_t is not unsigned long due to extra diagnostics. As the testcase is tested in C++98 too, I'm not using decltype (sizeof 0) but __SIZE_TYPE__. 2023-01-25 Jakub Jelinek <jakub@redhat.com> PR c++/107329 PR testsuite/108533 * g++.dg/init/new51.C (size_t): New typedef. (RexxClass::operator new, RexxClass::operator delete): Use size_t instead of unsigned long.
2023-01-24Introduce new module to create search paths of dynamic strings.Gaius Mulley15-153/+435
Introduce a simple DynamicStringPath module to allow the front end to create and modify a search path from dynamic strings. gcc/m2/ChangeLog: * Make-lang.in (GM2-COMP-BOOT-DEFS): Add DynamicStringPath.def. (GM2-COMP-BOOT-MODS): Add DynamicStringPath.mod. (GM2-COMP-DEFS): Add DynamicStringPath.def. (GM2-COMP-MODS): Add DynamicStringPath.mod. ($(objdir)/m2/gm2-libs-min/SYSTEM.def): Split path into multiple -I components. ($(objdir)/m2/gm2-libs/SYSTEM.def): Ditto. ($(objdir)/m2/gm2-libs-coroutines/SYSTEM.def): Ditto. * gm2-compiler/M2Options.mod: Import DynamicStringPath. (SetSearchPath): Reimplement using DynamicStringPath procedures. * gm2-compiler/M2Search.def (InitSearchPath): Remove. (PrependSearchPath): Remove. * gm2-compiler/M2Search.mod (SFIO): Remove import. (DynamicStringPath): Add import. (Directory): Remove. (UserPath): Remove. (InitialPath): Remove. (InitSearchPath): Remove. (PrependSearchPath): Remove. (FindSourceFile): Re-implement. (FindSourceDefFile): Re-implement. (FindSourceModFile): Re-implement. * gm2-gcc/init.cc (_M2_DynamicStringPath_init): New prototype. (init_FrontEndInit): Call _M2_DynamicStringPath_init. * tools-src/makeSystem: Allow multiple -I paths. * gm2-compiler/DynamicStringPath.def: New file. * gm2-compiler/DynamicStringPath.mod: New file. * gm2-gcc/m2options.h (M2Options_SetMakeIncludePath): Add prototype. Co-Authored by: Iain Sandoe <iain@sandoe.co.uk> libgm2/ChangeLog: * libm2cor/Makefile.am (SYSTEM.def): Split path into multiple -I components. * libm2cor/Makefile.in: Rebuild. * libm2min/Makefile.am (SYSTEM.def): Split path into multiple -I components. * libm2min/Makefile.in: Rebuild. * libm2iso/Makefile.am (SYSTEM.def): Split path into multiple -I components. * libm2iso/Makefile.in: Rebuild. Co-Authored by: Iain Sandoe <iain@sandoe.co.uk> Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-01-24c++: "" #pragma at BOF [PR108504]Jason Merrill2-1/+5
Since r11-2095 we pass flags to cp_lexer_get_preprocessor_token, and cp_lexer_new_main passes C_LEX_STRING_NO_JOIN when lexing most of the translation unit, but doesn't do that for the very first token; as a result, if the first token is a string literal, we try to join strings and get confused if that encounters a pragma. PR c++/108504 gcc/cp/ChangeLog: * parser.cc (cp_lexer_new_main): Pass C_LEX_STRING_NO_JOIN for first token, too. gcc/testsuite/ChangeLog: * g++.dg/ext/pragma1.C: New test.
2023-01-24c++: static lambda in template [PR108526]Jason Merrill2-0/+13
tsubst_lambda_expr uses build_memfn_type to build a METHOD_TYPE for the new lamba op(). This is not what we want for a C++23 static op(), but since we also use that METHOD_TYPE to communicate the closure type down to tsubst_function_decl, let's wait and turn it back at that point. PR c++/108526 gcc/cp/ChangeLog: * pt.cc (tsubst_function_decl): Handle static lambda. gcc/testsuite/ChangeLog: * g++.dg/cpp23/static-operator-call5.C: New test.
2023-01-24xtensa: Revise complex hard register clobber eliminationTakayuki 'January June' Suwa1-35/+37
In the previously posted patch "xtensa: Make complex hard register clobber elimination more robust and accurate", the check code for insns that refer to the [DS]Cmode hard register before it is overwritten after it is clobbered is incomplete. Fortunately such insns are seldom emitted, so it didn't matter. This patch fixes that for the sake of completeness. gcc/ChangeLog: * config/xtensa/xtensa.md: Fix exit from loops detecting references before overwriting in the split pattern.
2023-01-24LRA: Always do elimination and only for hard register to check insn constraintsVladimir N. Makarov3-10/+141
LRA does elimination but not always checks insn constraints in this case. This results in LRA failure for PDP11 target whose addition is only 2-op insn. The same might happen for other analogous targets. The patch fixes this problem. PR rtl-optimization/108388 gcc/ChangeLog: * lra-constraints.cc (get_hard_regno): Remove final_p arg. Always do elimination but only for hard register. (operands_match_p, uses_hard_regs_p, process_alt_operands): Adjust calls of get_hard_regno. gcc/testsuite/ChangeLog: * gcc.target/pdp11/pdp11.exp: New. * gcc.target/pdp11/pr108388.c: New.
2023-01-24Fortran: ICE in transformational_result [PR108529]Harald Anlauf2-0/+10
gcc/fortran/ChangeLog: PR fortran/108529 * simplify.cc (simplify_transformation): Do not try to simplify transformational intrinsic when the ARRAY argument has a NULL shape. gcc/testsuite/ChangeLog: PR fortran/108529 * gfortran.dg/pr108529.f90: New test.
2023-01-24IBM zSystems: Fix TARGET_D_CPU_VERSIONSStefan Schulze Frielinghaus1-4/+5
In the context of D the interpretation of S390, S390X, and SystemZ is a bit fuzzy. The wording S390X was wrongly deprecated in favour of SystemZ by commit https://github.com/dlang/dlang.org/commit/3b50a4c3faf01c32234d0ef8be5f82915a61c23f Thus, SystemZ is used for 64-bit targets, now, and S390 for 31-bit targets. However, in TARGET_D_CPU_VERSIONS depending on TARGET_ZARCH we set the CPU version to SystemZ. This is also the case if compiled for 31-bit targets leading to the following error: libphobos/libdruntime/core/sys/posix/sys/stat.d:967:13: error: static assert: '96u == 144u' is false 967 | static assert(stat_t.sizeof == 144); | ^ Thus in order to keep this patch simple I went for keeping SystemZ for 64-bit targets and S390, as usual, for 31-bit targets and dropped the distinction between ESA and z/Architecture. gcc/ChangeLog: * config/s390/s390-d.cc (s390_d_target_versions): Fix detection of CPU version.
2023-01-24Change m2 lexical analysis to optionally consume C comments.Gaius Mulley1-1/+69
This patch allows a subsequent patch to turn on/off the consuming of C comments. gcc/m2/ChangeLog: * m2.flex (cpreprocessor): Add temporary variable which is initialized to 0. (commentCLevel): New variable. (endOfCComment): New function. (splitSlashStar): New function to split /* into / and * tokens. (COMMENTC): New flex state. ("/*"): New rule to test whether we should treat /* as a single token or as two tokens. (<COMMENTC>.): New rule to skip a character. (<COMMENTC>\n.*): New rule to consume the line. (<COMMENTC>"*/"): New rule to call endOfCComment. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-01-24Bugfix ensure RTentity is a dependent of RTco.ccGaius Mulley1-1/+3
RTco is a definition for C module and therefore there is no RTco.mod. The RTco.cc uses RTentity and the import in RTco.def ensures that cc1gm2 can build a graph of all dependencies should -fscaffold-static be used. gcc/m2/ChangeLog: * gm2-libs-iso/RTco.def: Import RTentity. Declare RTco as a definition for C module. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-01-24arm: Make MVE masked stores read memory operand [PR 108177]Andre Vieira31-21/+428
This patch adds the memory operand of MVE masked stores as input operands to mimic the 'partial' writes, to prevent erroneous write-after-write optimizations as described in the PR. gcc/ChangeLog: PR target/108177 * config/arm/mve.md (mve_vstrbq_p_<supf><mode>, mve_vstrhq_p_fv8hf, mve_vstrhq_p_<supf><mode>, mve_vstrwq_p_<supf>v4si): Add memory operand as input operand. gcc/testsuite/ChangeLog: * gcc.target/arm/mve/pr108177-1-run.c: New test. * gcc.target/arm/mve/pr108177-1.c: New test. * gcc.target/arm/mve/pr108177-10-run.c: New test. * gcc.target/arm/mve/pr108177-10.c: New test. * gcc.target/arm/mve/pr108177-11-run.c: New test. * gcc.target/arm/mve/pr108177-11.c: New test. * gcc.target/arm/mve/pr108177-12-run.c: New test. * gcc.target/arm/mve/pr108177-12.c: New test. * gcc.target/arm/mve/pr108177-13-run.c: New test. * gcc.target/arm/mve/pr108177-13.c: New test. * gcc.target/arm/mve/pr108177-14-run.c: New test. * gcc.target/arm/mve/pr108177-14.c: New test. * gcc.target/arm/mve/pr108177-2-run.c: New test. * gcc.target/arm/mve/pr108177-2.c: New test. * gcc.target/arm/mve/pr108177-3-run.c: New test. * gcc.target/arm/mve/pr108177-3.c: New test. * gcc.target/arm/mve/pr108177-4-run.c: New test. * gcc.target/arm/mve/pr108177-4.c: New test. * gcc.target/arm/mve/pr108177-5-run.c: New test. * gcc.target/arm/mve/pr108177-5.c: New test. * gcc.target/arm/mve/pr108177-6-run.c: New test. * gcc.target/arm/mve/pr108177-6.c: New test. * gcc.target/arm/mve/pr108177-7-run.c: New test. * gcc.target/arm/mve/pr108177-7.c: New test. * gcc.target/arm/mve/pr108177-8-run.c: New test. * gcc.target/arm/mve/pr108177-8.c: New test. * gcc.target/arm/mve/pr108177-9-run.c: New test. * gcc.target/arm/mve/pr108177-9.c: New test. * gcc.target/arm/mve/pr108177-main.x: New test include. * gcc.target/arm/mve/pr108177.x: New test include.
2023-01-25C-SKY: Fix wrong sysroot suffix when disable multilib.Xianmiao Qu2-1/+9
The SYSROOT_SUFFIX_SPEC works even when multilib is disabled. So when build no-multilib glibc toolchain and the options are not same as MULTILIB_DEFAULTS, the sysroot will specify wrong because the libc will not be installed as such. This bug causes glibc regression test error: https://sourceware.org/pipermail/libc-testresults/2023q1/010706.html The error is: /scratch/jmyers/glibc-bot/install/compilers/csky-linux-gnuabiv2/csky-glibc-linux-gnuabiv2/bin/ld: cannot find -lc: No such file or directory gcc/ * config.gcc(csky-*-linux*): Define CSKY_ENABLE_MULTILIB and only include 'csky/t-csky-linux' when enable multilib. * config/csky/csky-linux-elf.h(SYSROOT_SUFFIX_SPEC): Don't define it when disable multilib.
2023-01-24tree-optimization/108500 - avoid useless fast-query compute in CFG cleanupRichard Biener3-6/+11
CFG cleanup computes dominators before the loop over blocks looking for merging opportunities. That computes also the fast-query DFS numbers but that's a bit pointless since any CFG cleanup will invalidate them immediately (they are re-computed before fixing up loops). The following avoids this and fixes the SIGSEGV due to the deep recursion in assign_dfs_numbers after inlining very many small functions. PR tree-optimization/108500 * dominance.h (calculate_dominance_info): Add parameter to indicate fast-query compute, defaulted to true. * dominance.cc (calculate_dominance_info): Honor fast-query compute parameter. * tree-cfgcleanup.cc (cleanup_tree_cfg_noloop): Do not compute the dominator fast-query DFS numbers.