aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2025-03-27testsuite: g++.dg: fix PR112938 filenameSam James1-0/+0
The test was being ignored because dg.exp looks for .C in g++.dg/. gcc/testsuite/ChangeLog: PR middle-end/112938 * g++.dg/strub-internal-pr112938.cc: Move to... * g++.dg/strub-internal-pr112938.C: ...here.
2025-03-27Add coverage_instrumentation_pJørgen Kvalsvik7-11/+23
Provide a helper for checking if any coverage (arc, conditions, paths) is enabled, rather than manually checking all the flags. This should make the intent clearer, and make it easier to maintain the checks when more flags are added. The function is forward declared in two header files as different passes tend to include different headers (profile.h vs value-prof.h). This could maybe be merged at some points, but profiling related symbols are already a bit spread out and should probably be handled in a targeted effort. gcc/ChangeLog: * builtins.cc (expand_builtin_fork_or_exec): Call coverage_instrumentation_p. * ipa-inline.cc (can_early_inline_edge_p): Likewise. * passes.cc (finish_optimization_passes): Likewise. * profile.cc (coverage_instrumentation_p): New function. * profile.h (coverage_instrumentation_p): New declaration. * tree-profile.cc (tree_profiling): Call coverage_instrumentation_p. (pass_ipa_tree_profile::gate): Likewise. * value-prof.h (coverage_instrumentation_p): New declaration.
2025-03-26Add prime path coverage to gcc/gcovJørgen Kvalsvik29-17/+5777
This patch adds prime path coverage to gcc/gcov. First, a quick introduction to path coverage, before I explain a bit on the pieces of the patch. PRIME PATHS Path coverage is recording the paths taken through the program. Here is a simple example: if (cond1) BB 1 then1 () BB 2 else else1 () BB 3 if (cond2) BB 4 then2 () BB 5 else else2 () BB 6 _ BB 7 To cover all paths you must run {then1 then2}, {then1 else2}, {else1 then1}, {else1 else2}. This is in contrast with line/statement coverage where it is sufficient to execute then2, and it does not matter if it was reached through then1 or else1. 1 2 4 5 7 1 2 4 6 7 1 3 4 5 7 1 3 4 6 7 This gets more complicated with loops, because 0, 1, 2, ..., N iterations are all different paths. There are different ways of addressing this, a promising one being prime paths. A prime path is a maximal simple path (a path with no repeated vertices) or simple cycle (no repeated vertices except for the first/last) Prime paths strike a decent balance between number of tests, path growth, and loop coverage, requiring loops to be both taken and skipped. Of course, the number of paths still grows very fast with program complexity - for example, this program has 14 prime paths: while (a) { if (b) return; while (c--) a++; } -- ALGORITHM Since the numbers of paths grows so fast, we need a good algorithm. The naive approach of generating all paths and discarding redundancies (see reference_prime_paths in the diff) simply doesn't complete for even pretty simple functions with a few ten thousand paths (granted, the implementation is also poor, but only serves as a reference). Fazli & Afsharchi in their paper "Time and Space-Efficient Compositional Method for Prime and Test Paths Generation" describe a neat algorithm which drastically improves on for most programs, and brings complexity down to something managable. This patch implements that algorithm with a few minor tweaks. The algorithm first finds the strongly connected components (SCC) of the graph and creates a new graph where the vertices are the SCCs of the CFG. Within these vertices different paths are found - regular prime paths, paths that start in the SCCs entries, and paths that end in the SCCs exits. These per-SCC paths are combined with paths through the CFG which greatly reduces of paths needed to be evaluated just to be thrown away. Using this algorithm we can find the prime paths for somewhat complicated functions in a reasonable time. Please note that some programs don't benefit from this at all. We need to find the prime paths within a SCC, so if a single SCC is very large the function degenerates to the naive implementation. This can probably be much improved on, but is an exercise for later. -- OVERALL ARCHITECTURE Like the other coverages in gcc, this operates on the CFG in the profiling phase, just after branch and condition coverage, in phases: 1. All prime paths are generated, counted, and enumerated from the CFG 2. The paths are evaluted and counter instructions and accumulators are emitted 3. gcov reads the CFG and computes the prime paths (same as step 1) 4. gcov prints a report Simply writing out all the paths in the .gcno file is not really viable, the files would be too big. Additionally, there are limits to the practicality of measuring (and reporting) on millions of paths, so for most programs where coverage is feasible, computing paths should be plenty fast. As a result, path coverage really only adds 1 bit to the counter, rounded up to nearest 64 ("bucket"), so 64 paths takes up 8 bytes, 65 paths take up 16 bytes. Recording paths is really just massaging large bitsets. Per function, ceil(paths/64 or 32) buckets (gcov_type) are allocated. Paths are sorted, so the first path maps to the lowest bit, the second path to the second lowest bit, and so on. On taking an edge and entering a basic block, a few bitmasks are applied to unset the bits corresponding to the paths outside the block and set the bits of the paths that start in that block. Finally, the right buckets are masked and written to the global accumulators for the paths that end in the block. Full coverage is achieved when all bits are set. gcc does not really inform gcov of abnormal paths, so paths with abnormal edges are ignored. This probably possible, but requires some changes to the graph gcc writes to the .gcno file. -- IMPLEMENTATION In order to remove non-prime paths (subpaths) we use a suffix tree. Fazli & Afsharchi do not discuss how duplicates or subpaths are removed, and using the suffix works really well -- insertion time is a function of the length of the (longest) paths, not the number of paths. The paths are usually quite short, but there are many of them. The same prime_paths function is used both in gcc and in gcov. As for speed, I would say that it is acceptable. Path coverage is a problem that is exponential in its very nature, so if you enable this feature you can reasonably expect it to take a while. To combat the effects of path explosion there is a limit at which point gcc will give up and refuse to instrument a function, set with -fpath-coverage-limit. Since estimating the number of prime paths is pretty much is counting them, gcc maintains a pessimistic running count which slightly overestimates the number of paths found so far. When that count exceeds the limit, the function aborts and gcc prints a warning. This is a blunt instrument meant to not get stuck on the occasional large function, not fine-grained control over when to skip instrumentation. My main benchmark has been tree-2.1.3/tree.c which generates approx 2M paths across the 20 functions or so in it. Most functions have less than 1500 paths, and 2 around a million each. Finding the paths takes 3.5-4s, but the instrumentation phase takes approx. 2.5 minutes and generates a 32M binary. Not bad for a 1429 line source file. There are some selftests which deconstruct the algorithm, so it can be easily referenced with the Fazli & Afsharchi. I hope that including them both help to catch regression, clarify the assumptions, and help understanding the algorithm by breaking up the phases. DEMO This is the denser line-aware (grep-friendlier) output. Every missing path is summarized as the lines you need to run in what order, annotated with the true/false/throw decision. $ gcc -fpath-coverage --coverage bs.c -c -o bs $ gcov -e --prime-paths-lines bs.o bs.gcda:cannot open data file, assuming not executed -: 0:Source:bs.c -: 0:Graph:bs.gcno -: 0:Data:- -: 0:Runs:0 paths covered 0 of 17 path 0 not covered: lines 6 6(true) 11(true) 12 path 1 not covered: lines 6 6(true) 11(false) 13(true) 14 path 2 not covered: lines 6 6(true) 11(false) 13(false) 16 path 3 not covered: lines 6 6(false) 18 path 4 not covered: lines 11(true) 12 6(true) 11 path 5 not covered: lines 11(true) 12 6(false) 18 path 6 not covered: lines 11(false) 13(true) 14 6(true) 11 path 7 not covered: lines 11(false) 13(true) 14 6(false) 18 path 8 not covered: lines 12 6(true) 11(true) 12 path 9 not covered: lines 12 6(true) 11(false) 13(true) 14 path 10 not covered: lines 12 6(true) 11(false) 13(false) 16 path 11 not covered: lines 13(true) 14 6(true) 11(true) 12 path 12 not covered: lines 13(true) 14 6(true) 11(false) 13 path 13 not covered: lines 14 6(true) 11(false) 13(true) 14 path 14 not covered: lines 14 6(true) 11(false) 13(false) 16 path 15 not covered: lines 6(true) 11(true) 12 6 path 16 not covered: lines 6(true) 11(false) 13(true) 14 6 #####: 1:int binary_search(int a[], int len, int from, int to, int key) -: 2:{ #####: 3: int low = from; #####: 4: int high = to - 1; -: 5: #####: 6: while (low <= high) -: 7: { #####: 8: int mid = (low + high) >> 1; #####: 9: long midVal = a[mid]; -: 10: #####: 11: if (midVal < key) #####: 12: low = mid + 1; #####: 13: else if (midVal > key) #####: 14: high = mid - 1; -: 15: else #####: 16: return mid; // key found -: 17: } #####: 18: return -1; -: 19:} Then there's the human-oriented source mode. Because it is so verbose I have limited the demo to 2 paths. In this mode gcov will print the sequence of *lines* through the program and in what order to cover the path, including what basic block the line is a part of. Like its denser sibling, this also prints the true/false/throw decision, if there is one. $ gcov -t --prime-paths-source bs.o bs.gcda:cannot open data file, assuming not executed -: 0:Source:bs.c -: 0:Graph:bs.gcno -: 0:Data:- -: 0:Runs:0 paths covered 0 of 17 path 0: BB 2: 1:int binary_search(int a[], int len, int from, int to, int key) BB 2: 3: int low = from; BB 2: 4: int high = to - 1; BB 2: 6: while (low <= high) BB 8: (true) 6: while (low <= high) BB 3: 8: int mid = (low + high) >> 1; BB 3: 9: long midVal = a[mid]; BB 3: (true) 11: if (midVal < key) BB 4: 12: low = mid + 1; path 1: BB 2: 1:int binary_search(int a[], int len, int from, int to, int key) BB 2: 3: int low = from; BB 2: 4: int high = to - 1; BB 2: 6: while (low <= high) BB 8: (true) 6: while (low <= high) BB 3: 8: int mid = (low + high) >> 1; BB 3: 9: long midVal = a[mid]; BB 3: (false) 11: if (midVal < key) BB 5: (true) 13: else if (midVal > key) BB 6: 14: high = mid - 1; The listing is also aware of inlining: hello.c: #include <stdio.h> #include "hello.h" int notmain(const char *entity) { return hello (entity); } #include <stdio.h> inline __attribute__((always_inline)) int hello (const char *s) { if (s) printf ("hello, %s!\n", s); else printf ("hello, world!\n"); return 0; } $ gcov -t --prime-paths-source hello paths covered 0 of 2 path 0: BB 2: (true) 4:int notmain(const char *entity) == inlined from hello.h == BB 2: (true) 6: if (s) BB 3: 7: printf ("hello, %s!\n", s); BB 5: 10: return 0; ------------------------- BB 7: 6: return hello (entity); BB 8: 6: return hello (entity); path 1: BB 2: (false) 4:int notmain(const char *entity) == inlined from hello.h == BB 2: (false) 6: if (s) BB 4: 9: printf ("hello, world!\n"); BB 5: 10: return 0; ------------------------- BB 7: 6: return hello (entity); BB 8: 6: return hello (entity); --prime-paths-{lines,source} take an optional argument type, which can be 'covered', 'uncovered', or 'both', which defaults to 'uncovered'. The flag controls if the covered or uncovered paths are printed, and while uncovered is generally the most useful one, it is sometimes nice to be able to see only the covered paths. And finally, JSON (abbreviated). It is quite sparse and very nested, but is mostly a JSON version of the source listing. It has to be this nested in order to consistently capture multiple locations. It is always includes the file name per location for consistency, even though this is very much redundant in almost all cases. This format is in no way set in stone, and without targeting it with other tooling I am not sure if it does the job well. "gcc_version": "15.0.0 20240704 (experimental)", "current_working_directory": "dir", "data_file": "hello.o", "files": [ { "file": "hello.c", "functions": [ { "name": "notmain", "demangled_name": "notmain", "start_line": 4, "start_column": 5, "end_line": 7, "end_column": 1, "blocks": 7, "blocks_executed": 0, "execution_count": 0, "total_prime_paths": 2, "covered_prime_paths": 0, "prime_path_coverage": [ { "id": 0, "sequence": [ { "block_id": 2, "locations": [ { "file": "hello.c", "line_numbers": [ 4 ] }, { "file": "hello.h", "line_numbers": [ 6 ] } ], "edge_kind": "fallthru" }, ... gcc/ChangeLog: * Makefile.in (OBJS): Add prime-paths.o, path-coverage.o. (GTFILES): Add prime-paths.cc, path-coverage.cc (GCOV_OBJS): Add graphds.o, prime-paths.o, bitmap.o * builtins.cc (expand_builtin_fork_or_exec): Check path_coverage_flag. * collect2.cc (main): Add -fno-path-coverage to OBSTACK. * common.opt: Add new options -fpath-coverage, -fpath-coverage-limit, -Wcoverage-too-many-paths * doc/gcov.texi: Add --prime-paths, --prime-paths-lines, --prime-paths-source documentation. * doc/invoke.texi: Add -fpath-coverage, -fpath-coverage-limit, -Wcoverage-too-many-paths documentation. * gcc.cc: Link gcov on -fpath-coverage. * gcov-counter.def (GCOV_COUNTER_PATHS): New. * gcov-io.h (GCOV_TAG_PATHS): New. (GCOV_TAG_PATHS_LENGTH): New. (GCOV_TAG_PATHS_NUM): New. * gcov.cc (class path_info): New. (struct coverage_info): Add paths, paths_covered. (find_prime_paths): New. (add_path_counts): New. (find_arc): New. (print_usage): Add -e, --prime-paths, --prime-paths-lines, --prime-paths-source. (process_args): Likewise. (json_set_prime_path_coverage): New. (output_json_intermediate_file): Call json_set_prime_path_coverage. (process_all_functions): Call find_prime_paths. (generate_results): Call add_path_counts. (read_graph_file): Read path counters. (read_count_file): Likewise. (function_summary): Print path counts. (file_summary): Likewise. (print_source_line): New. (print_prime_path_lines): New. (print_inlined_separator): New. (print_prime_path_source): New. (output_path_coverage): New. (output_lines): Print path coverage. * ipa-inline.cc (can_early_inline_edge_p): Check path_coverage_flag. * passes.cc (finish_optimization_passes): Likewise. * profile.cc (branch_prob): Likewise. * selftest-run-tests.cc (selftest::run_tests): Run path coverage tests. * selftest.h (path_coverage_cc_tests): New declaration. * tree-profile.cc (tree_profiling): Check path_coverage_flag. (pass_ipa_tree_profile::gate): Likewise. * path-coverage.cc: New file. * prime-paths.cc: New file. gcc/testsuite/ChangeLog: * lib/gcov.exp: Add prime paths test function. * g++.dg/gcov/gcov-22.C: New test. * g++.dg/gcov/gcov-23-1.h: New test. * g++.dg/gcov/gcov-23-2.h: New test. * g++.dg/gcov/gcov-23.C: New test. * gcc.misc-tests/gcov-29.c: New test. * gcc.misc-tests/gcov-30.c: New test. * gcc.misc-tests/gcov-31.c: New test. * gcc.misc-tests/gcov-32.c: New test. * gcc.misc-tests/gcov-33.c: New test. * gcc.misc-tests/gcov-34.c: New test.
2025-03-26gcov: branch, conds, calls in function summariesJørgen Kvalsvik1-5/+43
The gcov function summaries only output the covered lines, not the branches and calls. Since the function summaries is an opt-in it probably makes sense to also include branch coverage, calls, and condition coverage. $ gcc --coverage -fpath-coverage hello.c -o hello $ ./hello Before: $ gcov -f hello Function 'main' Lines executed:100.00% of 4 Function 'fn' Lines executed:100.00% of 7 File 'hello.c' Lines executed:100.00% of 11 Creating 'hello.c.gcov' After: $ gcov -f hello Function 'main' Lines executed:100.00% of 3 No branches Calls executed:100.00% of 1 Function 'fn' Lines executed:100.00% of 7 Branches executed:100.00% of 4 Taken at least once:50.00% of 4 No calls File 'hello.c' Lines executed:100.00% of 10 Creating 'hello.c.gcov' Lines executed:100.00% of 10 With conditions: $ gcov -fg hello Function 'main' Lines executed:100.00% of 3 No branches Calls executed:100.00% of 1 No conditions Function 'fn' Lines executed:100.00% of 7 Branches executed:100.00% of 4 Taken at least once:50.00% of 4 Condition outcomes covered:100.00% of 8 No calls File 'hello.c' Lines executed:100.00% of 10 Creating 'hello.c.gcov' Lines executed:100.00% of 10 gcc/ChangeLog: * gcov.cc (generate_results): Count branches, conditions. (function_summary): Output branch, calls, condition count.
2025-03-26Fortran: fix bogus recursion with DT default initialization [PR118796]Harald Anlauf2-1/+40
PR fortran/118796 gcc/fortran/ChangeLog: * resolve.cc: Do not apply default initialization to a derived-type function result if the resolved function is use-associated. gcc/testsuite/ChangeLog: * gfortran.dg/derived_result_4.f90: New test.
2025-03-26testsuite, powerpc: fix broken dg directivesDavid Malcolm2-2/+2
Found by dg-lint. gcc/testsuite/ChangeLog: * gcc.target/powerpc/pr70243.c: Fix missing trailing " }" in dg-do directive. * gcc.target/powerpc/pr91903.c: Likewise. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2025-03-26testsuite, gomp: fix broken dg directivesDavid Malcolm3-3/+3
gcc/testsuite/ChangeLog: * c-c++-common/gomp/metadirective-target-device-2.c: Fix missing trailing " }" on dg-do directive. * gcc.dg/gomp/attrs-21.c: Likewise for dg-options. * gcc.dg/gomp/parallel-2.c: Drop ":" from dg-message. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2025-03-26testsuite: fix broken dg directivesDavid Malcolm10-16/+16
Found by dg-lint. gcc/testsuite/ChangeLog: * gcc.dg/ipa/pr110377.c: Fix missing trailing " }" in dg-do directive. * gcc.dg/plugin/infoleak-1.c: Fix dg-bogus directive. * gcc.dg/pr101364-1.c: Fix missing trailing " }" in dg-options directive. * gcc.dg/pr113207.c: Fix dg-do. * gcc.dg/sarif-output/include-chain-2.c: Fix ordering of dg-do and dg-require-effective-target. * gcc.dg/strub-pr118007.c: Likewise. * gcc.dg/tanhbysinh.c: Fix missing whitespace after opening brace and before closing brace in 6 dg-final directives. * gcc.dg/uninit-pred-3_c.c: Fix missing whitespace after opening brace in 6 dg-final directive. * gcc.dg/uninit-pred-3_d.c: Likewise. * gcc.dg/variable-sized-type-flex-array.c: Fix missing space between dg-bogus and message in 2 places. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2025-03-26cobol: Replace quadratic loop removing std::set elementsJonathan Wakely1-18/+14
There's no need to keep using std::find_if from the beginning of the container after every removal, just update the iterator after erasing an element. This is how C++20 std::erase_if is implemented. gcc/cobol/ChangeLog: * except.cc (cbl_enabled_exceptions_t::turn_on_off): Replace quadratic loop with a single pass.
2025-03-26cobol: Bring trunk in line with Dubner's test system.Bob Dubner2-4/+24
gcc/cobol * genapi.cc: (parser_display_internal): Adjust for E vs e exponent notation. * parse.y: (literal_refmod_valid): Display correct value in error message.
2025-03-26cobol: Get rid of __int128 uses in the COBOL FE [PR119242]Jakub Jelinek3-104/+20
The following patch changes some remaining __int128 uses in the FE into FIXED_WIDE_INT(128), i.e. emulated 128-bit integral type. The use of wide_int_to_tree directly from that rather than going through build_int_cst_type means we don't throw away the upper 64 bits of the values, so the emitting of constants needing full 128 bits can be greatly simplied. Plus all the #pragma GCC diagnostic ignored "-Wpedantic" spots aren't needed, we don't use the _Float128/__int128 types directly in the FE anymore. Note, PR119241/PR119242 bugs are still not fully fixed, I think the remaining problem is that several FE sources include ../../libgcobol/libgcobol.h and that header declares various APIs with __int128 and _Float128 types, so trying to build a cross-compiler on a host without __int128 and _Float128 will still fail miserably. I believe none of those APIs are actually used by the FE, so the question is what the FE needs from libgcobol.h and whether the rest could be wrapped with #ifndef IN_GCC or #ifndef IN_GCC_FRONTEND or something similar (those 2 macros are predefined when compiling the FE files). 2025-03-26 Jakub Jelinek <jakub@redhat.com> PR cobol/119242 * genutil.h (get_power_of_ten): Remove #pragma GCC diagnostic around declaration. * genapi.cc (psa_FldLiteralN): Change type of value from __int128 to FIXED_WIDE_INT(128). Remove #pragma GCC diagnostic around the declaration. Use wi::min_precision to determine minimum unsigned precision of the value. Use wi::neg_p instead of value < 0 tests and wi::set_bit_in_zero<FIXED_WIDE_INT(128)> to build sign bit. Handle field->data.capacity == 16 like 1, 2, 4 and 8, use wide_int_to_tree instead of build_int_cst. (mh_source_is_literalN): Remove #pragma GCC diagnostic around the definition. (binary_initial_from_float128): Likewise. * genutil.cc (get_power_of_ten): Remove #pragma GCC diagnostic before the definition.
2025-03-26d: import __stdin causes compilation to pause while reading from stdinIain Buclaw6-59/+20
Moves the special handling of reading from stdin out of the language semantic routines. All references to `__stdin.d` have also been removed from the front-end implementation. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 02a64d2e13.
2025-03-26c++: Fix FAIL: g++.dg/tree-ssa/initlist-opt1.CJonathan Wakely1-1/+1
My r15-8904-ge200f53a555651 changed the std::vector initializer-list constructor so that it calls a new _M_range_initialize_n function instead of _M_range_initialize. Change the scan-tree-dump pattern in this g++.dg test to match the new gimple output. gcc/testsuite/ChangeLog: * g++.dg/tree-ssa/initlist-opt1.C: Match _M_range_initialize_n instead of _M_range_initialize.
2025-03-26testsuite: i386: Fix c-c++-common/gomp/metadirective-device.c etc. with i?86 ↵Rainer Orth2-2/+2
compiler Two new tests FAIL on both Solaris/x86 and Linux/i686 with a 32-bit-default compiler: FAIL: c-c++-common/gomp/metadirective-device.c -std=c++17 scan-tree-dump-not optimized "__builtin_GOMP_error" FAIL: c-c++-common/gomp/metadirective-device.c -std=c++26 scan-tree-dump-not optimized "__builtin_GOMP_error" FAIL: c-c++-common/gomp/metadirective-device.c -std=c++98 scan-tree-dump-not optimized "__builtin_GOMP_error" FAIL: c-c++-common/gomp/metadirective-target-device-1.c -std=c++17 scan-tree-dump-times optimized "GOMP_error" 0 FAIL: c-c++-common/gomp/metadirective-target-device-1.c -std=c++26 scan-tree-dump-times optimized "GOMP_error" 0 FAIL: c-c++-common/gomp/metadirective-target-device-1.c -std=c++98 scan-tree-dump-times optimized "GOMP_error" 0 FAIL: c-c++-common/gomp/metadirective-device.c scan-tree-dump-not optimized "__builtin_GOMP_error" FAIL: c-c++-common/gomp/metadirective-target-device-1.c scan-tree-dump-times optimized "GOMP_error" 0 They also FAIL on Linux/x86_64 with -mx32. The problem is two-fold: restricting a test to target x86_64-*-* is always wrong: an i?86-*-* compiler can produce 64-bit code with -m64 just as well, so it should always be both. In addition, the -mx32 failure shows that the test seems to be 64-bit only. To fix both issues, this patch uses the new x86 effective-target keyword and restricts the tests to lp64 instead of ! ia32. Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu. 2025-03-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> gcc/testsuite: * c-c++-common/gomp/metadirective-device.c (dg-additional-options): Use on all x86 targets. Restrict to lp64. * c-c++-common/gomp/metadirective-target-device-1.c: Likewise.
2025-03-26testsuite: Fix up append-args-interop.f90 testJakub Jelinek1-1/+2
The gcc/testsuite/*/gomp/ tests aren't compiled with include or module paths pointing to libgomp, so shouldn't be using omp.h nor use omp_lib etc. The following patch adjusts the test to define it locally, like e.g. recently in interop-5.f90 test or many other tests which have their own definitions of types or enumerators they need. 2025-03-26 Jakub Jelinek <jakub@redhat.com> * gfortran.dg/gomp/append-args-interop.f90: Don't use omp_lib, instead use iso_c_binding and define omp_interop_kind parameter locally.
2025-03-26driver: Forward '-lstdc++' to offloading compilation [PR101544]Thomas Schwinge3-3/+6
..., so that users don't manually need to specify '-foffload-options=-lstdc++' in addition to '-lstdc++' (specified manually, or implicitly by the driver). Do like commit 4bcb46b3ade1796c5a57b294f5cca25f00671cac "driver: Forward '-lgfortran', '-lm' to offloading compilation". PR driver/101544 gcc/ * gcc.cc (driver_handle_option): Forward host '-lstdc++' to offloading compilation. * config/gcn/mkoffload.cc (main): Adjust. * config/nvptx/mkoffload.cc (main): Likewise. libgomp/ * testsuite/libgomp.c++/pr101544-1-O0.C: Remove '-foffload-options=-lstdc++'. * testsuite/libgomp.c++/pr101544-1.C: Likewise. * testsuite/libgomp.oacc-c++/pr101544-1.C: Likewise.
2025-03-26C++: Adjust implicit '__cxa_bad_typeid' prototype to realityThomas Schwinge1-11/+7
In 2001 Subversion r40924 (Git commit 52a11cbfcf0cfb32628b6953588b6af4037ac0b6) "IA-64 ABI Exception Handling", '__cxa_bad_typeid' changed from 'std::type_info const &' to 'void' return type: --- libstdc++-v3/libsupc++/exception_support.cc +++ /dev/null @@ -1,388 +0,0 @@ -[...] -// Helpers for rtti. Although these don't return, we give them return types so -// that the type system is not broken. -[...] -extern "C" std::type_info const & -__cxa_bad_typeid () -{ - [...] -} -[...] --- /dev/null +++ libstdc++-v3/libsupc++/unwind-cxx.h @@ -0,0 +1,163 @@ +[...] +extern "C" void __cxa_bad_typeid (); +[...] --- /dev/null +++ libstdc++-v3/libsupc++/eh_aux_runtime.cc @@ -0,0 +1,56 @@ +[...] +extern "C" void +__cxa_bad_typeid () +{ + [...] +} The implicit prototype in the C++ front end however wasn't likewise adjusted, and so for nvptx we generate code for 'std::type_info const &' return type: // BEGIN GLOBAL FUNCTION DECL: __cxa_bad_typeid .extern .func (.param .u64 %value_out) __cxa_bad_typeid; { .param .u64 %value_in; call (%value_in),__cxa_bad_typeid; trap; // (noreturn) exit; // (noreturn) ld.param.u64 %r39,[%value_in]; } ..., which is in conflict with the library code with 'void' return type: // BEGIN GLOBAL FUNCTION DECL: __cxa_bad_typeid .visible .func __cxa_bad_typeid; // BEGIN GLOBAL FUNCTION DEF: __cxa_bad_typeid .visible .func __cxa_bad_typeid { [...] } ..., and we thus get execution test FAILs for 'g++.dg/rtti/typeid11.C', for example: error : Prototype doesn't match for '__cxa_bad_typeid' in 'input file 4 at offset 22204', first defined in 'input file 4 at offset 22204' nvptx-run: cuLinkAddData failed: unknown error (CUDA_ERROR_UNKNOWN, 999) With this patched, we get the expected: // BEGIN GLOBAL FUNCTION DECL: __cxa_bad_typeid -.extern .func (.param .u64 %value_out) __cxa_bad_typeid; +.extern .func __cxa_bad_typeid; { -.param .u64 %value_in; -call (%value_in),__cxa_bad_typeid; +call __cxa_bad_typeid; trap; // (noreturn) exit; // (noreturn) -ld.param.u64 %r39,[%value_in]; } ..., and execution test PASSes for a few test cases. gcc/cp/ * rtti.cc (throw_bad_typeid): Adjust implicit '__cxa_bad_typeid' prototype to reality. Adjust all users. Co-authored-by: Jason Merrill <jason@redhat.com>
2025-03-26widening_mul: Fix up further r14-8680 widening mul issues [PR119417]Jakub Jelinek2-4/+68
The following testcase is miscompiled since r14-8680 PR113560 changes. I've already tried to fix some of the issues caused by that change in r14-8823 PR113759, but apparently didn't get it right. The problem is that the r14-8680 changes sometimes set *type_out to a narrower type than the *new_rhs_out actually has (because it will handle stuff like _1 = rhs1 & 0xffff; and imply from that HImode type_out. Now, if in convert_mult_to_widen or convert_plusminus_to_widen we actually get optab for the modes we've asked for (i.e. with from_mode and to_mode), everything works fine, if the operands don't have the expected types, they are converted to those (for INTEGER_CSTs with fold_convert, otherwise with build_and_insert_cast). On the following testcase on aarch64 that is not the case, we ask for from_mode HImode and to_mode DImode, but get actual_mode SImode. The mult_rhs1 operand already has SImode and we change type1 to unsigned int and so no cast is actually done, except that the & 0xffff is lost that way. The following patch ensures that if we change typeN because of wider actual_mode (or because of a sign change), we first cast to the old typeN (if the r14-8680 code was encountered, otherwise it would have the same precision) and only then change it, and then perhaps cast again. On the testcase on aarch64-linux the patch results in the expected - add x19, x19, w0, uxtw 1 + add x19, x19, w0, uxth 1 difference. 2025-03-26 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/119417 * tree-ssa-math-opts.cc (convert_mult_to_widen): Before changing typeN because actual_precision/from_unsignedN differs cast rhsN to typeN if it has a different type. (convert_plusminus_to_widen): Before changing typeN because actual_precision/from_unsignedN differs cast mult_rhsN to typeN if it has a different type. * gcc.dg/torture/pr119417.c: New test.
2025-03-26profile: Don't instrument fake exit edges after musttail [PR118442]Jakub Jelinek2-0/+31
When -fprofile-generate is used musttail often fails because the compiler adds instrumentation after the tail calls. This patch ignores EDGE_FAKE edges added from musttail calls to EXIT. 2025-03-26 Jakub Jelinek <jakub@redhat.com> Andi Kleen <ak@gcc.gnu.org> PR gcov-profile/118442 * profile.cc (branch_prob): Ignore EDGE_FAKE edges from musttail calls to EXIT. * c-c++-common/pr118442.c: New test.
2025-03-26i386: Fix up pr55583.c testcase [PR119465]Jakub Jelinek1-4/+3
In r15-4289 H.J. fixed up the pr55583.c testcase to use unsigned long long or long long instead of unsigned long or long. That change looks correct to me because the void test64r () { b = ((u64)b >> n) | (a << (64 - n)); } etc. functions otherwise aren't really 64-bit rotates, but something that triggers UB all the time (at least one of the shifts is out of bounds). I assume that change fixed the FAILs on -mx32, but it caused FAIL: gcc.target/i386/pr55583.c scan-assembler-times (?n)shldl?[\\\\t ]*\\\\\$2 1 FAIL: gcc.target/i386/pr55583.c scan-assembler-times (?n)shrdl?[\\\\t ]*\\\\\$2 2 regression on i686-linux (but just for -m32 without defaulting to SSE2 or what). The difference is that for say -m32 -march=x86-64 the stv pass handles some of the rotates in SSE and so we get different sh[rl]dl instruction counts from the case when SSE isn't enabled and stv pass isn't done. The following patch fixes that by disabling SSE for ia32 and always testing for the same number of instructions. Tested with all of make check-gcc RUNTESTFLAGS='--target_board=unix\{-m32/-march=x86-64,-m32/-march=i686,-mx32,-m64\} i386.exp=pr55583.c' 2025-03-26 Jakub Jelinek <jakub@redhat.com> PR target/55583 PR target/119465 * gcc.target/i386/pr55583.c: Add -mno-sse -mno-mmx to dg-additional-options. Expect 4 shrdl and 2 shldl instructions on ia32.
2025-03-26testsuite: i386: Require dfp support in gcc.target/i386/pr117946.c etc.Rainer Orth2-1/+4
Two tests FAIL on 64-bit Solaris/x86: FAIL: gcc.target/i386/pr117946.c (test for excess errors) FAIL: gcc.target/i386/pr118017.c (test for excess errors) The failure mode is the same in both cases: Excess errors: /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.target/i386/pr117946.c:4:47: error: decimal floating-point not supported for this target Excess errors: /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.target/i386/pr118017.c:6:47: error: decimal floating-point not supported for this target Fixed by requiring dfp support. Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu. 2025-03-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> gcc/testsuite: * gcc.target/i386/pr117946.c: Require dfp support. * gcc.target/i386/pr118017.c: Likewise. Use dg-require-effective-target for both this and int128.
2025-03-26i386: Require in peephole2 that memory is offsettable [PR119450]Jakub Jelinek2-1/+18
The following testcase ICEs because a peephole2 attempts to offset memory which is not offsettable (in particular address is a ZERO_EXTEND in this case). Because peephole2s don't support constraints, I've added a check for this in the peephole2's condition. 2025-03-26 Jakub Jelinek <jakub@redhat.com> PR target/119450 * config/i386/i386.md (narrow test peephole2): Test for offsettable_memref_p in condition. * gcc.target/i386/pr119450.c: New test.
2025-03-26target/119010 - add missing DF load/store reservations for znver4 and znver5Richard Biener1-5/+5
The following resolves missing reservations for DFmode *movdf_internal loads and stores, visible as 'nothing' in -fsched-verbose=2 dumps. PR target/119010 * config/i386/zn4zn5.md (znver4_sse_mov_fp, znver4_sse_mov_fp_load, znver5_sse_mov_fp_load, znver4_sse_mov_fp_store, znver5_sse_mov_fp_store): Also match V1SF and DF.
2025-03-26target/119010 - add missing integer store reservations for znver4 and znver5Richard Biener1-0/+26
The imov and imovx classified stores miss reservations in the znver4/5 pipeline description. The following adds them. PR target/119010 * config/i386/zn4zn5.md (znver4_imov_double_store, znver5_imov_double_store, znver4_imov_store, znver5_imov_store): New reservations for integer stores.
2025-03-26middle-end/118795 - fix can_vec_perm_const_p query in match.pdRichard Biener2-1/+16
When expanding to RTL we always use vec_perm_indices with two operands which can make a difference with respect to supported vs. unsupported. So the following adjusts a query in match.pd for target support which got this "wrong" and using 1 for a equal operand permute. PR middle-end/118795 * match.pd (vec_perm <vec_perm <a, b>> -> vec_perm <a, b>): Use the appropriate check to see whether the original outer permute was supported. * g++.dg/torture/pr118795.C: New testcase.
2025-03-26rust: Use 'lbasename()' consistently.Iain Sandoe1-1/+1
The amends the remaining case in the rust code to use the libiberty lbasename() instead of the (potentially variably-behaved) system 'basename()'. gcc/rust/ChangeLog: * metadata/rust-export-metadata.cc (PublicInterface::write_to_path): Use 'lbasename()' instead of 'basename()'. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
2025-03-26testsuite: add testcase for recent alias fixSam James1-0/+16
r15-7961-gdc47161c1f32c3 fixes a typo in ao_compare::compare_ao_refs but there wasn't a testcase available at the time. Now there is. Thanks to Andrew for the testcase. gcc/testsuite/ChangeLog: PR testsuite/119382 * gcc.dg/ipa/ipa-icf-40.c: New test. Co-authored-by: Andrew Pinski <quic_apinski@quicinc.com>
2025-03-26i386: Add "s_" as Saturation for AVX10.2 Converting Intrinsics.Hu, Lin110-141/+141
This patch aims to add "s_" after 'cvt' represent saturation. gcc/ChangeLog: * config/i386/avx10_2-512convertintrin.h (_mm512_mask_cvtx2ps_ph): Formatting fixes (_mm512_mask_cvtx_round2ps_ph): Ditto (_mm512_maskz_cvtx_round2ps_ph): Ditto (_mm512_cvtbiassph_bf8): Rename to _mm512_cvts_biasph_bf8. (_mm512_mask_cvtbiassph_bf8): Rename to _mm512_mask_cvts_biasph_bf8. (_mm512_maskz_cvtbiassph_bf8): Rename to _mm512_maskz_cvts_biasph_bf8. (_mm512_cvtbiassph_hf8): Rename to _mm512_cvts_biasph_hf8. (_mm512_mask_cvtbiassph_hf8): Rename to _mm512_mask_cvts_biasph_hf8. (_mm512_maskz_cvtbiassph_hf8): Rename to _mm512_maskz_cvts_biasph_hf8. (_mm512_cvts2ph_bf8): Rename to _mm512_cvts_2ph_bf8. (_mm512_mask_cvts2ph_bf8): Rename to _mm512_mask_cvts_2ph_bf8. (_mm512_maskz_cvts2ph_bf8): Rename to _mm512_maskz_cvts_2ph_bf8. (_mm512_cvts2ph_hf8): Rename to _mm512_cvts_2ph_hf8. (_mm512_mask_cvts2ph_hf8): Rename to _mm512_mask_cvts_2ph_hf8. (_mm512_maskz_cvts2ph_hf8): Rename to _mm512_maskz_cvts_2ph_hf8. (_mm512_cvtsph_bf8): Rename to _mm512_cvts_ph_bf8. (_mm512_mask_cvtsph_bf8): Rename to _mm512_mask_cvts_ph_bf8. (_mm512_maskz_cvtsph_bf8): Rename to _mm512_maskz_cvts_ph_bf8. (_mm512_cvtsph_hf8): Rename to _mm512_cvts_ph_hf8. (_mm512_mask_cvtsph_hf8): Rename to _mm512_mask_cvts_ph_hf8. (_mm512_maskz_cvtsph_hf8): Rename to _mm512_maskz_cvts_ph_hf8. * config/i386/avx10_2convertintrin.h (_mm_cvtbiassph_bf8): Rename to _mm_cvts_biasph_bf8. (_mm_mask_cvtbiassph_bf8): Rename to _mm_mask_cvts_biasph_bf8. (_mm_maskz_cvtbiassph_bf8): Rename to _mm_maskz_cvts_biasph_bf8. (_mm256_cvtbiassph_bf8): Rename to _mm256_cvts_biasph_bf8. (_mm256_mask_cvtbiassph_bf8): Rename to _mm256_mask_cvts_biasph_bf8. (_mm256_maskz_cvtbiassph_bf8): Rename to _mm256_maskz_cvts_biasph_bf8. (_mm_cvtbiassph_hf8): Rename to _mm_cvts_biasph_hf8. (_mm_mask_cvtbiassph_hf8): Rename to _mm_mask_cvts_biasph_hf8. (_mm_maskz_cvtbiassph_hf8): Rename to _mm_maskz_cvts_biasph_hf8. (_mm256_cvtbiassph_hf8): Rename to _mm256_cvts_biasph_hf8. (_mm256_mask_cvtbiassph_hf8): Rename to _mm256_mask_cvts_biasph_hf8. (_mm256_maskz_cvtbiassph_hf8): Rename to _mm256_maskz_cvts_biasph_hf8. (_mm_cvts2ph_bf8): Rename to _mm_cvts_2ph_bf8. (_mm_mask_cvts2ph_bf8): Rename to _mm_mask_cvts_2ph_bf8. (_mm_maskz_cvts2ph_bf8): Rename to _mm_maskz_cvts_2ph_bf8. (_mm256_cvts2ph_bf8): Rename to _mm256_cvts_2ph_bf8. (_mm256_mask_cvts2ph_bf8): Rename to _mm256_mask_cvts_2ph_bf8. (_mm256_maskz_cvts2ph_bf8): Rename to _mm256_maskz_cvts_2ph_bf8. (_mm_cvts2ph_hf8): Rename to _mm_cvts_2ph_hf8. (_mm_mask_cvts2ph_hf8): Rename to _mm_mask_cvts_2ph_hf8. (_mm_maskz_cvts2ph_hf8): Rename to _mm_maskz_cvts_2ph_hf8. (_mm256_cvts2ph_hf8): Rename to _mm256_cvts_2ph_hf8. (_mm256_mask_cvts2ph_hf8): Rename to _mm256_mask_cvts_2ph_hf8. (_mm256_maskz_cvts2ph_hf8): Rename to _mm256_maskz_cvts_2ph_hf8. (_mm_cvtsph_bf8): Rename to _mm_cvts_ph_bf8. (_mm_mask_cvtsph_bf8): Rename to _mm_mask_cvts_ph_bf8. (_mm_maskz_cvtsph_bf8): Rename to _mm_maskz_cvts_ph_bf8. (_mm256_cvtsph_bf8): Rename to _mm256_cvts_ph_bf8. (_mm256_mask_cvtsph_bf8): Rename to _mm256_mask_cvts_ph_bf8. (_mm256_maskz_cvtsph_bf8): Rename to _mm256_maskz_cvts_ph_bf8. (_mm_cvtsph_hf8): Rename to _mm_cvts_ph_hf8. (_mm_mask_cvtsph_hf8): Rename to _mm_mask_cvts_ph_hf8. (_mm_maskz_cvtsph_hf8): Rename to _mm_maskz_cvts_ph_hf8. (_mm256_cvtsph_hf8): Rename to _mm256_cvts_ph_hf8. (_mm256_mask_cvtsph_hf8): Rename to _mm256_mask_cvts_ph_hf8. (_mm256_maskz_cvtsph_hf8): Rename to _mm256_maskz_cvts_ph_hf8. gcc/testsuite/ChangeLog: * gcc.target/i386/avx10_2-512-convert-1.c: Modify function name to follow the latest version. * gcc.target/i386/avx10_2-512-vcvt2ph2bf8s-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvt2ph2hf8s-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtbiasph2bf8s-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtbiasph2hf8s-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtph2bf8s-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtph2hf8s-2.c: Ditto. * gcc.target/i386/avx10_2-convert-1.c: Ditto.
2025-03-26Daily bump.GCC Administrator8-1/+530
2025-03-25cobol: Changes to eliminate _Float128 from the front end [PR119241]Bob Dubner13-303/+395
These changes switch _Float128 types to REAL_VALUE_TYPE in the front end. Some __int128 variables and function return values are changed to FIXED_WIDE_INT(128) gcc/cobol PR cobol/119241 * cdf.y: (cdfval_base_t::operator()): Return const. * cdfval.h: (struct cdfval_base_t): Add const cdfval_base_t& operator(). (struct cdfval_t): Add cdfval_t constructor. Change cdf_value definitions. * gcobolspec.cc (lang_specific_driver): Formatting fix. * genapi.cc: Include fold-const.h and realmpfr.h. (initialize_variable_internal): Use real_to_decimal instead of strfromf128. (get_binary_value_from_float): Use wide_int_to_tree instead of build_int_cst_type. (psa_FldLiteralN): Use fold_convert instead of strfromf128, real_from_string and build_real. (parser_display_internal): Rewritten to work on REAL_VALUE_TYPE rather than _Float128. (mh_source_is_literalN): Use FIXED_WIDE_INT(128) rather than __int128, wide_int_to_tree rather than build_int_cst_type, fold_convert rather than build_string_literal. (real_powi10): New function. (binary_initial_from_float128): Change type of last argument from _Float128 to REAL_VALUE_TYPE, process it using real.cc and mpfr APIs. (digits_from_float128): Likewise. (initial_from_float128): Make static. Remove value argument, add local REAL_VALUE_TYPE value variable instead, process it using real.cc and native_encode_expr APIs. (parser_symbol_add): Adjust initial_from_float128 caller. * genapi.h (initial_from_float128): Remove declaration. * genutil.cc (get_power_of_ten): Change return type from __int128 to FIXED_WIDE_INT(128), ditto for retval type, change type of pos from __int128 to unsigned long long. (scale_by_power_of_ten_N): Use wide_int_to_tree instead of build_int_cst_type. Use FIXED_WIDE_INT(128) instead of __int128 as power_of_ten variable type. (copy_little_endian_into_place): Likewise. * genutil.h (get_power_of_ten): Change return type from __int128 to FIXED_WIDE_INT(128). * parse.y (%union): Change type of float128 from _Float128 to REAL_VALUE_TYPE. (string_of): Change argument type from _Float128 to const REAL_VALUE_TYPE &, use real_to_decimal rather than strfromf128. Add another overload with tree argument type. (field: cdf): Use real_zerop rather than comparison against 0.0. (occurs_clause, const_value): Use real_to_integer. (value78): Use build_real and real_to_integer. (data_descr1): Use real_to_integer. (count): Use real_to_integer, real_from_integer and real_identical instead of direct comparison. (value_clause): Use real_from_string3 instead of num_str2i. Use real_identical instead of direct comparison. Use build_real. (allocate): Use real_isneg and real_iszero instead of <= 0 comparison. (move_tgt): Use real_to_integer, real_value_truncate, real_from_integer and real_identical instead of comparison of casts. (cce_expr): Use real_arithmetic and real_convert or real_value_negate instead of direct arithmetics on _Float128. (cce_factor): Use real_from_string3 instead of numstr2i. (literal_refmod_valid): Use real_to_integer. * symbols.cc (symbol_table_t::registers_t::registers_t): Formatting fix. (ERROR_FIELD): Likewise. (extend_66_capacity): Likewise. (cbl_occurs_t::subscript_ok): Use real_to_integer, real_from_integer and real_identical. * symbols.h (cbl_field_data_t::etc_t::value): Change type from _Float128 to tree. (cbl_field_data_t::etc_t::etc_t): Adjust defaulted argument value. (cbl_field_data_t::cbl_field_data_t): Formatting fix. Use etc() rather than etc(0). (cbl_field_data_t::value_of): Change return type from _Float128 to tree. (cbl_field_data_t::operator=): Change return and argument type from _Float128 to tree. (cbl_field_data_t::valify): Use real_from_string, real_value_truncate and build_real. (cbl_field_t::same_as): Use build_zero_cst instead of _Float128(0.0). gcc/testsuite * cobol.dg/literal1.cob: New testcase. * cobol.dg/output1.cob: Likewise Co-authored-by: Richard Biener <rguenth@suse.de> Co-authored-by: Jakub Jelinek <jakub@redhat.com> Co-authored-by: James K. Lowden <jklowden@cobolworx.com> Co-authored-by: Robert Dubner <rdubher@symas.com>
2025-03-25c++: add fixed test [PR101881]Marek Polacek1-0/+5
Fixed recently by r15-7822. PR c++/101881 gcc/testsuite/ChangeLog: * g++.dg/ext/vector44.C: New test.
2025-03-25c++: Properly fold <COND_EXPR>.*<COMPONENT> [PR114525]Simon Martin2-1/+37
We've been miscompiling the following since r0-51314-gd6b4ea8592e338 (I did not go compile something that old, and identified this change via git blame, so might be wrong) === cut here === struct Foo { int x; }; Foo& get (Foo &v) { return v; } void bar () { Foo v; v.x = 1; (true ? get (v) : get (v)).*(&Foo::x) = 2; // v.x still equals 1 here... } === cut here === The problem lies in build_m_component_ref, that computes the address of the COND_EXPR using build_address to build the representation of (true ? get (v) : get (v)).*(&Foo::x); and gets something like &(true ? get (v) : get (v)) // #1 instead of (true ? &get (v) : &get (v)) // #2 and the write does not go where want it to, hence the miscompile. This patch replaces the call to build_address by a call to cp_build_addr_expr, which gives #2, that is properly handled. PR c++/114525 gcc/cp/ChangeLog: * typeck2.cc (build_m_component_ref): Call cp_build_addr_expr instead of build_address. gcc/testsuite/ChangeLog: * g++.dg/expr/cond18.C: New test.
2025-03-25gcc, gcov: Use 'lbasename' consistently.Iain Sandoe1-1/+1
The 'basename' implementation can vary with the host platform (e.g. POSIX c.f. Linux). This is the only current uses of basename() in the source so convert them to use lbasename() as most other cases do. gcc/ChangeLog: * gcov.cc (get_gcov_intermediate_filename): Use lbasename(). Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
2025-03-25gcc, configure: When checking for basename, use the same process as ↵Iain Sandoe3-11/+29
libiberty [PR119250]. We need the configure result from the decl check for basename() in the GCC configuration to match that obtained when configuring libiberty or we get conflicts when <libgen.h> is included in any TU that also includes "system.h" or "libiberty.h" directly. PR other/119250 gcc/ChangeLog: * config.in: Regenerate. * configure: Regenerate. * configure.ac: Match the configure test in libiberty when checking the basename decl. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
2025-03-25C prototypes for functions returning C function pointers.Thomas Koenig1-3/+23
This patch handles dumping prototypes for C functions returning function pointers. For the test case MODULE test USE, INTRINSIC :: ISO_C_BINDING CONTAINS FUNCTION lookup(idx) BIND(C) type(C_FUNPTR) :: lookup integer(C_INT), VALUE :: idx lookup = C_FUNLOC(x1) END FUNCTION lookup subroutine x1() end subroutine x1 END MODULE test the prototype is void (*lookup (int idx)) (); Regression-tested. Again no test case because I don't know how. During testing, I also found that vtabs were dumped, this is also corrected. gcc/fortran/ChangeLog: PR fortran/119419 * dump-parse-tree.cc (write_funptr_fcn): New function. (write_type): Invoke it for C_FUNPTR. (write_interop_decl): Do not dump vtabs.
2025-03-25Add support of --enable-host-pie to the native Ada compilerEric Botcazou2-39/+60
gcc/ada/ PR ada/119440 * gcc-interface/Make-lang.in (GCC_LINK): Filter out -pie in stage 1 (GCC_LLINK): Likewise. * gcc-interface/Makefile.in (COMPILER): Delete and replace by CC. (COMPILER_FLAGS): Delete. (ALL_COMPILERFLAGS): Delete and replace by ALL_CFLAGS. (ALL_ADAFLAGS): Move around. (enable_host_pie): New substituted variable. (LD_PICFLAG): Likewise. Do not add it to TOOLS_LIBS. (LIBIBERTY): Test enable_host_pie. (LIBGNAT): Likewise and use libgnat_pic.a if yes. (TOOLS_FLAGS_TO_PASS): Pass $(PICFLAG) under CFLAGS & $(LD_PICFLAG) under LDFLAGS. Also pass through ADA_CFLAGS. (common-tools): Add $(ALL_CFLAGS) $(ADA_CFLAGS) to the --GCC string of $(GNATLINK) commands. (../../gnatdll$(exeext)): Likewise. (gnatmake-re): Likewise. (gnatlink-re): Likewise. (gnatlib-shared-dual): Remove all the object files at the end. gnattools/ PR ada/119440 * configure.ac (host-pie): New switch. (host-bind-now): Likewise. Substitute PICFLAG and LD_PICFLAG. * configure: Regenerate. * Makefile.in (PICFLAG): New substituted variable. (LD_PICFLAG): Likewise. (TOOLS_FLAGS_TO_PASS): Pass $(PICFLAG) under CFLAGS & $(LD_PICFLAG) under LDFLAGS. Do not pass -I- under ADA_INCLUDES. (TOOLS_FLAGS_TO_PASS_RE): Likewise.
2025-03-25c++: lambda, default argument, unevaluated contextyxj-github-4372-0/+14
This patch would like to avoid the ICE when template lambdas call with default parameters in unevaluated context. The bug is the same as https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119385. For example: 1 | template <class T> 2 | void foo(T x) { 3 | sizeof []<int=0>(T=x) { return 0; }(); 4 | } 5 | 6 | void test { 7 | foo(0); 8 | } when compile with -fsyntax-only -std=c++20, it will have ICE similar to test.cc: In instantiation of 'void foo(T) [with T = int]': test.cc:7:6: required from here 6 | foo(0); | ~~~^~~ test.cc:3:38: internal compiler error: in tsubst_expr, at cp/pt.cc:21919 2 | sizeof []<int=0>(T=x) { return 0; }(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ And if without the template code `<int=0>`, the code will pass compile, it's wrong. When parsing lambda, the sizeof will affect the lambda internal unevaluated operand being handled. So consider save/restore cp_unevaluated_operand. gcc/cp/ChangeLog: * parser.cc (cp_parser_lambda_expression): Use cp_evaluated. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/lambda-uneval25.C: New test. Reviewed-by: Jason Merrill <jason@redhat.com>
2025-03-25arm: testsuite: skip mtp tests on thumb1Richard Earnshaw4-0/+4
These tests need access to the MRC instruction, but that isn't part of of the Thumb1 ISA. So skip the tests when this isn't the case. gcc/testsuite/ChangeLog: * gcc.target/arm/mtp_1.c: Require arm32. * gcc.target/arm/mtp_2.c: Likewise. * gcc.target/arm/mtp_3.c: Likewise. * gcc.target/arm/mtp_4.c: Likewise.
2025-03-25OpenMP: Create additional interop objects with append_args.Sandra Loosemore8-71/+274
This patch adds support for the case where #pragma omp declare variant with append_args is used inside a #pragma omp dispatch interop that specifies fewer interop args than required by the variant; new interop objects are implicitly created and then destroyed around the call to the variant, using the GOMP_interop builtin. gcc/fortran/ChangeLog * trans-openmp.cc (gfc_trans_omp_declare_variant): Remove accidental redeclaration of pref. gcc/ChangeLog * gimplify.cc (modify_call_for_omp_dispatch): Adjust arguments. Remove the "sorry" for the case where new interop objects must be constructed, and add code to make it work instead. (expand_variant_call_expr): Adjust arguments and call to modify_call_for_omp_dispatch. (gimplify_variant_call_expr): Simplify logic for calling expand_variant_call_expr. gcc/testsuite/ChangeLog * c-c++-common/gomp/append-args-1.c: Adjust expected behavior. * c-c++-common/gomp/append-args-interop.c: New. * c-c++-common/gomp/dispatch-11.c: Adjust expected behavior. * g++.dg/gomp/append-args-1.C: Likewise. * gfortran.dg/gomp/append-args-interop.f90: New. * gfortran.dg/gomp/declare-variant-mod-2.f90: Adjust expected behavior. libgomp/ChangeLog * libgomp.texi (OpenMP 5.1): Mark append_args as fully supported. Co-Authored-By: Tobias Burnus <tburnus@baylibre.com>
2025-03-25arm: testsuite: adjust ftest testsRichard Earnshaw25-58/+34
The ftest-*.c tests for Arm check certain ACLE mandated macros to ensure they are correctly defined based on the selected architecture. ACLE states that the macro should be defined if the operation exists in the hardware, but it doesn't have to exist in the current ISA because and interworking call to the library function will still result in using the hardware operation (both GCC and Clang agree on this). So adjust the tests accordingly. Whilst cleaning this up, also remove the now redundant dg-skip-if operations that were testing for incompatible command-line options. That should now be a thing of the past as the framework will clean this up more thoroughly before running the test, or detect incompatible option combinations. gcc/testsuite/ChangeLog: * gcc.target/arm/ftest-armv4t-thumb.c: Expect __ARM_FEATURE_CLZ to be defined. Remove redundant dg-skip-if rules. * gcc.target/arm/ftest-armv5t-thumb.c: Likewise. * gcc.target/arm/ftest-armv5te-thumb.c: Likewise. * gcc.target/arm/ftest-armv6-thumb.c: Likewise. * gcc.target/arm/ftest-armv6k-thumb.c: Likewise. * gcc.target/arm/ftest-armv6z-thumb.c: Likewise. * gcc.target/arm/ftest-armv7em-thumb.c: Remove redundant dg-skip-if rules. Add a require-effective-target for armv7em. * gcc.target/arm/ftest-armv7a-arm.c: Likewise. * gcc.target/arm/ftest-armv7a-thumb.c: Likewise. * gcc.target/arm/ftest-armv7r-arm.c: Likewise. * gcc.target/arm/ftest-armv7r-thumb.c: Likewise. * gcc.target/arm/ftest-armv7ve-arm.c: Likewise. * gcc.target/arm/ftest-armv7ve-thumb.c: Likewise. * gcc.target/arm/ftest-armv8a-arm.c: Likewise. * gcc.target/arm/ftest-armv8a-thumb.c: Likewise. * gcc.target/arm/ftest-armv4-arm.c: Remove redundant dg-skip-if rules. * gcc.target/arm/ftest-armv4t-arm.c: Likewise. * gcc.target/arm/ftest-armv5t-arm.c: Likewise. * gcc.target/arm/ftest-armv5te-arm.c: Likewise. * gcc.target/arm/ftest-armv6-arm.c: Likewise. * gcc.target/arm/ftest-armv6k-arm.c: Likewise. * gcc.target/arm/ftest-armv6m-thumb.c: Likewise. * gcc.target/arm/ftest-armv6t2-arm.c: Likewise. * gcc.target/arm/ftest-armv6t2-thumb.c: Likewise. * gcc.target/arm/ftest-armv6z-arm.c: Likewise.
2025-03-25i386: Fix up combination of -2 r<<= (x & 7) into btr [PR119428]Jakub Jelinek2-2/+22
The following patch is miscompiled from r15-8478 but latently already since my r11-5756 and r11-6631 changes. The r11-5756 change was https://gcc.gnu.org/pipermail/gcc-patches/2020-December/561164.html which changed the splitters to immediately throw away the masking. And the r11-6631 change was an optimization to recognize (set (zero_extract:HI (...) (const_int 1) (...)) (const_int 1) as btr. The problem is their interaction. x86 is not a SHIFT_COUNT_TRUNCATED target, so the masking needs to be explicit in the IL. And combine.cc (make_field_assignment) has since 1992 optimizations which try to optimize x &= (-2 r<< y) into zero_extract (x) = 0. Now, such an optimization is fine if y has not been masked or if the chosen zero_extract has the same mode as the rotate (or it recognizes something with a left shift too). IMHO such optimization is invalid for SHIFT_COUNT_TRUNCATED targets because we explicitly say that the masking of the shift/rotate counts are redundant there and don't need to be part of the IL (I have a patch for that, but because it is just latent, I'm not sure it needs to be posted for gcc 15 (and also am not sure if it should punt or add operand masking just in case)). x86 is not SHIFT_COUNT_TRUNCATED though and so even fixing combine not to do that for SHIFT_COUNT_TRUNCATED targets doesn't help, and we don't have QImode insv, so it is optimized into HImode insertions. Now, if the y in x &= (-2 r<< y) wasn't masked in any way, turning it into HImode btr is just fine, but if it was x &= (-2 r<< (y & 7)) and we just decided to throw away the masking, using btr changes the behavior on it and causes e2fsprogs and sqlite miscompilations. So IMHO on !SHIFT_COUNT_TRUNCATED targets, we need to keep the maskings explicit in the IL, either at least for the duration of the combine pass as does the following patch (where combine is the only known pass to have such transformation), or even keep it until final pass in case there are some later optimizations that would also need to know whether there was explicit masking or not and with what mask. The latter change would be much larger. The following patch just reverts the r11-5756 change and adds a testcase. 2025-03-25 Jakub Jelinek <jakub@redhat.com> PR target/96226 PR target/119428 * config/i386/i386.md (splitter after *<rotate_insn><mode>3_mask, splitter after *<rotate_insn><mode>3_mask_1): Revert 2020-12-05 changes. * gcc.c-torture/execute/pr119428.c: New test.
2025-03-25RISC-V: disable the abd expander for gcc-15 release [PR119224]Vineet Gupta3-4/+32
It seems the new expander triggers a latent issue in sched1 causing extraneous spills in a different sad variant. Given how close we are to gcc-15 release, disable it for now. Since we do want to retain and re-enable this capabilty, manully disable vs. reverting the orig patch which takes away the test case too. Fix the orig test case to expect old codegen idiom (although vneg is no longer emitted, in favor of vrsub). Also add a new testcase which flags any future spills in the affected routine. PR target/119224 gcc/ChangeLog: * config/riscv/autovec.md: Disable abd splitter. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/pr117722.c: Adjust output insn. * gcc.target/riscv/rvv/autovec/pr119224.c: Add new test. Signed-off-by: Vineet Gupta <vineetg@rivosinc.com>
2025-03-25OpenMP: interop - fix Fortran testPaul-Antoine Arras1-4/+10
This fixes up commit r15-8654-g99e2906ae255fc: * Do not use omp_lib in Fortran compile test; instead, provide needed declarations explicitly. * Update scan-dump patterns to be compatible with 32-bit architectures. gcc/testsuite/ChangeLog: * gfortran.dg/gomp/interop-5.f90: Declare omp_interop_kind explicitly instead of use'ing omp_lib. Update scan-dumps to allow for 4-byte pointers.
2025-03-25install.texi: gcn - suggest to use Newlib with simd math fix [PR119325]Tobias Burnus1-2/+3
Suggest a Newlib with a fix for the SIMD math issue. Newlib commit: https://sourceware.org/git/?p=newlib-cygwin.git;a=commitdiff;h=2ef1a37e7 Additionally, for generic support in ROCm, it is expected that 6.4 will added the support; the current version is 6.3.3 and it does not support it; bump >6.3.2 to >6.3.3 in install.texi to avoid doubts. gcc/ChangeLog: PR middle-end/119325 * doc/install.texi (gcn): Change ROCm > 6.3.2 to >6.3.3 for generic support; mention Newlib commit that fixes a SIMD math issue.
2025-03-25omp-general.cc: Remove 'if' around call to always 'true' returning function ↵Tobias Burnus1-8/+5
[PR118627] Before omp_parse_access_method and omp_parse_access_methods unconditionally returned true, now they are void functions. Accordingly, calls had to be updated by removing the 'if' around the call; this also fixes Clang's -Wsometimes-uninitialized warning when compiling omp-general.cc as one variable remained uninitialized for a never occurring false. gcc/ChangeLog: PR middle-end/118627 * omp-general.cc (omp_parse_access_method): Change to return void. (omp_parse_access_methods): Return void; remove 'if' around a function call. (omp_parse_expr): Remove 'if' around a function call.
2025-03-25arm: testsuite: avoid dg-options in primary LTO fileRichard Earnshaw1-2/+1
As the primary LTO file in this test, it cannot use dg-options. Move the flags from there to dg-lto-options. gcc/testsuite/ChangeLog: * gcc.target/arm/lto/pr96939_0.c (dg-options): Delete. Move the options from here ... (dg-lto-options): ... to here.
2025-03-25arm: testsuite: update expected output in vect-early-break-cbranch.cRichard Earnshaw1-6/+6
Similar to r15-4930-gd56d2f3102ada3, update the branch operations when not using CBN?Z for inverting the direction of the branch operations. gcc/testsuite/ChangeLog: * gcc.target/arm/vect-early-break-cbranch.c: Allow BEQ as well as BNE.
2025-03-25arm: testsuite use -std=gnu17 for pr65647.cRichard Earnshaw1-1/+1
This test has missing prototypes. To avoid disturbing the test, use gnu17. gcc/testsuite/ChangeLog: * gcc.target/arm/pr65647.c (dg-options): Add -std=gnu17.
2025-03-25testsuite: aarch64: arm: Remove redundant dg-do run in advsimd-intrinsics testsChristophe Lyon120-120/+0
Tests under advsimd-intrinsics are controlled by advsimd-intrinsics.exp which computes the adequate dg-do-what depending on the actual target, it should not be redefined in the tests, except when the action can never be 'run'. This currently makes no difference, but it would when we remove dg-skip-if for arm targets from tests that could at least be compiled (e.g. vst1x2.c) gcc/testsuite/ * gcc.target/aarch64/advsimd-intrinsics/vabdh_f16_1.c: Remove dg-do directive. * gcc.target/aarch64/advsimd-intrinsics/vabsh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vaddh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcageh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcagth_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcaleh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcalth_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vceqh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vceqzh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcgeh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcgezh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcgth_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcgtzh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcleh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vclezh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vclth_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcltzh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtah_s16_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtah_s32_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtah_s64_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtah_u16_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtah_u32_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtah_u64_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_f16_s16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_f16_s32_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_f16_s64_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_f16_u16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_f16_u32_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_f16_u64_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_n_f16_s16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_n_f16_s32_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_n_f16_s64_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_n_f16_u16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_n_f16_u32_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_n_f16_u64_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_n_s16_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_n_s32_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_n_s64_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_n_u16_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_n_u32_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_n_u64_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_s16_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_s32_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_s64_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_u16_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_u32_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvth_u64_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtmh_s16_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtmh_s32_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtmh_s64_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtmh_u16_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtmh_u32_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtmh_u64_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtnh_s16_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtnh_s32_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtnh_s64_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtnh_u16_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtnh_u32_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtnh_u64_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtph_s16_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtph_s32_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtph_s64_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtph_u16_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtph_u32_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vcvtph_u64_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vdiv_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vdivh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vduph_lane.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vfmah_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vfmas_lane_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vfmas_n_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vfmash_lane_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vfmsh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vld1x2.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vld1x3.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vld1x4.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vmaxh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vmaxnmh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vmaxnmv_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vmaxv_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vminh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vminnmh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vminnmv_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vminv_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vmul_lane_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vmulh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vmulh_lane_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vmulx_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vmulx_lane_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vmulx_n_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vmulxh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vmulxh_lane_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vnegh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vpminmaxnm_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vqrshrn_high_n.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vqrshrun_high_n.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vqshrn_high_n.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vqshrun_high_n.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrecpeh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrecpsh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrecpxh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrndah_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrndh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrndi_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrndih_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrndmh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrndnh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrndph_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrndxh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrsqrteh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrsqrtsh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vsqrt_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vsqrth_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vst1x2.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vst1x3.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vst1x4.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vsubh_f16_1.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vtrn_half.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vuzp_half.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vzip_half.c: Likewise.
2025-03-25testsuite: aarch64: restore torture options in vml[as]_float_not_used.cChristophe Lyon2-4/+0
Remove dg-options, so that the test is executed as expected using the options defined by advsimd-intrinsics.exp. gcc/testsuite/ * gcc.target/aarch64/advsimd-intrinsics/vmla_float_not_fused.c: Remove dg-options. * gcc.target/aarch64/advsimd-intrinsics/vmls_float_not_fused.c: Likewise.