aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-5.c
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2025-04-12 09:40:24 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2025-04-12 22:02:26 +0200
commit8a03d014ec096b3e8c9941a6bf724d3daaeeb289 (patch)
tree6a795c03a70c51ab075e37b22121e03c6600e623 /gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-5.c
parent359b6128ade70f80cc850fdc8e3e90837ba1ff70 (diff)
downloadgcc-8a03d014ec096b3e8c9941a6bf724d3daaeeb289.zip
gcc-8a03d014ec096b3e8c9941a6bf724d3daaeeb289.tar.gz
gcc-8a03d014ec096b3e8c9941a6bf724d3daaeeb289.tar.bz2
d: Fix -fonly= argument only matches when including full path [PR119758]
Using `strcmp' to match the `-fonly=' argument with the input source file made the feature inflexible to use. By mistake, the driver was also found to omit all other modules on the command line as well, which differed from the documentation on the flag: Tell the compiler to parse and run semantic analysis on all modules on the command line, but only generate code for the given argument. New tests added to check the feature, which didn't exist before. PR d/119758 gcc/d/ChangeLog: * d-lang.cc (d_parse_file): Use endswith in test for -fonly= argument. * d-spec.cc (lang_specific_driver): Rework -fonly= and pass all input files to the front-end compiler when the option is seen. gcc/testsuite/ChangeLog: * gdc.dg/driver_fonly1.d: New test. * gdc.dg/driver_fonly2.d: New test. * gdc.dg/driver_fonly3.d: New test. * gdc.dg/imports/fonly.d: New test.
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-5.c')
0 files changed, 0 insertions, 0 deletions