aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.fortran/alloc-7.f90
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2022-12-14 17:16:42 +0100
committerThomas Schwinge <thomas@codesourcery.com>2023-02-22 09:19:51 +0100
commit320dc51c2d9969f644885cc1afa0d8a924f0ab87 (patch)
tree0f1c8ad8634499ef4b4c2d4ccb06c90bd9c9889c /libgomp/testsuite/libgomp.fortran/alloc-7.f90
parent7411eca498beb13729cc2acec77e68250940aa81 (diff)
downloadgcc-320dc51c2d9969f644885cc1afa0d8a924f0ab87.zip
gcc-320dc51c2d9969f644885cc1afa0d8a924f0ab87.tar.gz
gcc-320dc51c2d9969f644885cc1afa0d8a924f0ab87.tar.bz2
Add '-Wno-complain-wrong-lang', and use it in 'gcc/testsuite/lib/target-supports.exp:check_compile' and elsewhere
I noticed that GCC/Rust recently lost all LTO variants in torture testing: PASS: rust/compile/torture/all_doc_comment_line_blocks.rs -O0 (test for excess errors) PASS: rust/compile/torture/all_doc_comment_line_blocks.rs -O1 (test for excess errors) PASS: rust/compile/torture/all_doc_comment_line_blocks.rs -O2 (test for excess errors) -PASS: rust/compile/torture/all_doc_comment_line_blocks.rs -O2 -flto -fno-use-linker-plugin -flto-partition=none (test for excess errors) -PASS: rust/compile/torture/all_doc_comment_line_blocks.rs -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects (test for excess errors) PASS: rust/compile/torture/all_doc_comment_line_blocks.rs -O3 -g (test for excess errors) PASS: rust/compile/torture/all_doc_comment_line_blocks.rs -Os (test for excess errors) Etc. The reason is that when probing for availability of LTO, we run into: spawn [...]/build-gcc/gcc/testsuite/rust/../../gccrs -B[...]/build-gcc/gcc/testsuite/rust/../../ -fdiagnostics-plain-output -frust-incomplete-and-experimental-compiler-do-not-use -flto -c -o lto8274.o lto8274.c cc1: warning: command-line option '-frust-incomplete-and-experimental-compiler-do-not-use' is valid for Rust but not for C For GCC/Rust testing, this flag is (as of recently) defaulted in 'gcc/testsuite/lib/rust.exp:rust_init': lappend ALWAYS_RUSTFLAGS "additional_flags=-frust-incomplete-and-experimental-compiler-do-not-use" A few more "command-line option [...] is valid for [...] but not for [...]" instances were found in the test suite logs, when more than one language is involved. With '-Wno-complain-wrong-lang' used in 'gcc/testsuite/lib/target-supports.exp:check_compile', we get back: PASS: rust/compile/torture/all_doc_comment_line_blocks.rs -O0 (test for excess errors) PASS: rust/compile/torture/all_doc_comment_line_blocks.rs -O1 (test for excess errors) PASS: rust/compile/torture/all_doc_comment_line_blocks.rs -O2 (test for excess errors) +PASS: rust/compile/torture/all_doc_comment_line_blocks.rs -O2 -flto -fno-use-linker-plugin -flto-partition=none (test for excess errors) +PASS: rust/compile/torture/all_doc_comment_line_blocks.rs -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects (test for excess errors) PASS: rust/compile/torture/all_doc_comment_line_blocks.rs -O3 -g (test for excess errors) PASS: rust/compile/torture/all_doc_comment_line_blocks.rs -Os (test for excess errors) Etc., and in total: === rust Summary for unix === # of expected passes [-4990-]{+6718+} # of expected failures [-39-]{+51+} Anything that 'gcc/opts-global.cc:complain_wrong_lang' might do is cut short by '-Wno-complain-wrong-lang', not just the one 'warning' diagnostic. This corresponds to what already exists via 'lang_hooks.complain_wrong_lang_p'. The 'gcc/opts-common.cc:prune_options' changes follow the same rationale as PR67640 "driver passes -fdiagnostics-color= always last": we need to process '-Wno-complain-wrong-lang' early, so that it properly affects other options appearing before it on the command line. gcc/ * common.opt (-Wcomplain-wrong-lang): New. * doc/invoke.texi (-Wno-complain-wrong-lang): Document it. * opts-common.cc (prune_options): Handle it. * opts-global.cc (complain_wrong_lang): Use it. gcc/testsuite/ * gcc.dg/Wcomplain-wrong-lang-1.c: New. * gcc.dg/Wcomplain-wrong-lang-2.c: Likewise. * gcc.dg/Wcomplain-wrong-lang-3.c: Likewise. * gcc.dg/Wcomplain-wrong-lang-4.c: Likewise. * gcc.dg/Wcomplain-wrong-lang-5.c: Likewise. * lib/target-supports.exp (check_compile): Use '-Wno-complain-wrong-lang'. * g++.dg/abi/empty12.C: Likewise. * g++.dg/abi/empty13.C: Likewise. * g++.dg/abi/empty14.C: Likewise. * g++.dg/abi/empty15.C: Likewise. * g++.dg/abi/empty16.C: Likewise. * g++.dg/abi/empty17.C: Likewise. * g++.dg/abi/empty18.C: Likewise. * g++.dg/abi/empty19.C: Likewise. * g++.dg/abi/empty22.C: Likewise. * g++.dg/abi/empty25.C: Likewise. * g++.dg/abi/empty26.C: Likewise. * gfortran.dg/bind-c-contiguous-1.f90: Likewise. * gfortran.dg/bind-c-contiguous-4.f90: Likewise. * gfortran.dg/bind-c-contiguous-5.f90: Likewise. libgomp/ * testsuite/libgomp.fortran/alloc-10.f90: Use '-Wno-complain-wrong-lang'. * testsuite/libgomp.fortran/alloc-11.f90: Likewise. * testsuite/libgomp.fortran/alloc-7.f90: Likewise. * testsuite/libgomp.fortran/alloc-9.f90: Likewise. * testsuite/libgomp.fortran/allocate-1.f90: Likewise. * testsuite/libgomp.fortran/depend-4.f90: Likewise. * testsuite/libgomp.fortran/depend-5.f90: Likewise. * testsuite/libgomp.fortran/depend-6.f90: Likewise. * testsuite/libgomp.fortran/depend-7.f90: Likewise. * testsuite/libgomp.fortran/depend-inoutset-1.f90: Likewise. * testsuite/libgomp.fortran/examples-4/declare_target-1.f90: Likewise. * testsuite/libgomp.fortran/examples-4/declare_target-2.f90: Likewise. * testsuite/libgomp.fortran/order-reproducible-1.f90: Likewise. * testsuite/libgomp.fortran/order-reproducible-2.f90: Likewise. * testsuite/libgomp.oacc-fortran/parallel-dims.f90: Likewise. * testsuite/libgomp.fortran/task-detach-6.f90: Remove left-over 'dg-prune-output'.
Diffstat (limited to 'libgomp/testsuite/libgomp.fortran/alloc-7.f90')
-rw-r--r--libgomp/testsuite/libgomp.fortran/alloc-7.f903
1 files changed, 2 insertions, 1 deletions
diff --git a/libgomp/testsuite/libgomp.fortran/alloc-7.f90 b/libgomp/testsuite/libgomp.fortran/alloc-7.f90
index 57ecd83..8ef40ff 100644
--- a/libgomp/testsuite/libgomp.fortran/alloc-7.f90
+++ b/libgomp/testsuite/libgomp.fortran/alloc-7.f90
@@ -1,5 +1,6 @@
! { dg-additional-sources alloc-7.c }
-! { dg-prune-output "command-line option '-fintrinsic-modules-path=.*' is valid for Fortran but not for C" }
+! { dg-additional-options -Wno-complain-wrong-lang }
+
module m
use omp_lib
use iso_c_binding