]> gcc.gnu.org Git - gcc.git/commitdiff
Also test -std=c++0x mode with 'make check-c++' at top level
authorJason Merrill <jason@redhat.com>
Wed, 13 Jul 2011 20:30:54 +0000 (16:30 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 13 Jul 2011 20:30:54 +0000 (16:30 -0400)
Also test -std=c++0x mode with 'make check-c++' at top level
* Makefile.in (check-gcc-c++0x): New.
(check-c++): Depend on it.
gcc/
* Makefile.in ($(lang_checks_parallelized)): Allow --tool_opts.
gcc/cp/
* Make-lang.in (check-c++0x): New.
gcc/testsuite/
* lib/g++.exp (${tool}_option_help, ${tool}_option_proc): Remove.
* lib/lto.exp (lto_prune_warns): Prune warning about -std=c++0x
when compiling C files.

From-SVN: r176250

18 files changed:
ChangeLog
Makefile.in
gcc/ChangeLog
gcc/Makefile.in
gcc/cp/ChangeLog
gcc/cp/Make-lang.in
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/debug/dwarf2/lineno-simple1.C
gcc/testsuite/g++.dg/debug/dwarf2/pr44641.C
gcc/testsuite/g++.dg/ext/utf-dflt.C
gcc/testsuite/g++.dg/init/vector1.C
gcc/testsuite/g++.dg/lookup/anon2.C
gcc/testsuite/g++.dg/torture/pr35526.C
gcc/testsuite/g++.dg/tree-ssa/copyprop.C
gcc/testsuite/g++.old-deja/g++.ext/arrnew.C
gcc/testsuite/g++.old-deja/g++.jason/rfg27.C
gcc/testsuite/lib/g++.exp
gcc/testsuite/lib/lto.exp

index ec1b42bd20b90f56c81d2bef27aaac864adde619..ee64c35de89da2961350620889812dc1ae349c22 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-13  Jason Merrill  <jason@redhat.com>
+
+       * Makefile.in (check-gcc-c++0x): New.
+       (check-c++): Depend on it.
+
 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        PR target/39150
index 4f8b396edcbdb340235e15facbe515999cb11cdf..506d26e544c97fb519e73d41122713b6457c4595 100644 (file)
@@ -40152,7 +40152,12 @@ check-gcc-c++:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++);
-check-c++: check-gcc-c++ check-target-libstdc++-v3
+check-gcc-c++0x:
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++0x);
+check-c++: check-gcc-c++ check-gcc-c++0x check-target-libstdc++-v3
 
 .PHONY: check-gcc-fortran check-fortran
 check-gcc-fortran:
index 46df27b65027d12abb8cae29500d60ffa49eeb6a..5182bbc8dde493a574546db90af61c7d39fff977 100644 (file)
@@ -1,3 +1,7 @@
+2011-07-13  Jason Merrill  <jason@redhat.com>
+
+       * Makefile.in ($(lang_checks_parallelized)): Allow --tool_opts.
+
 2011-07-13  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
        * config/spu/spu.c (spu_init_libfuncs): Install __clrsbdi2.
index fcc8b7e203cadfcfcba6e70be7c0acd026a882ca..cd4f7820ce6ec4e262730e85226954ea90adc9db 100644 (file)
@@ -5018,7 +5018,7 @@ check_p_subdirs=$(wordlist 1,$(words $(check_$*_parallelize)),$(check_p_numbers)
 
 # For parallelized check-% targets, this decides whether parallelization
 # is desirable (if -jN is used and RUNTESTFLAGS doesn't contain anything
-# but optionally --target_board argument).  If it is desirable,
+# but optional --target_board or --tool_opts arguments).  If it is desirable,
 # recursive make is run with check-parallel-$lang{,1,2,3,4,5} etc. goals,
 # which can be executed in parallel, as they are run in separate directories.
 # check-parallel-$lang{1,2,3,4,5} etc. goals invoke runtest with the longest
@@ -5035,7 +5035,7 @@ check_p_subdirs=$(wordlist 1,$(words $(check_$*_parallelize)),$(check_p_numbers)
 # to lang_checks_parallelized variable and define check_$lang_parallelize
 # variable (see above check_gcc_parallelize description).
 $(lang_checks_parallelized): check-% : site.exp
-       @if [ -z "$(filter-out --target_board=%, $(RUNTESTFLAGS))" ] \
+       @if [ -z "$(filter-out --target_board=%,$(filter-out --tool_opts%,$(RUNTESTFLAGS)))" ] \
            && [ "$(filter -j, $(MFLAGS))" = "-j" ]; then \
          $(MAKE) TESTSUITEDIR="$(TESTSUITEDIR)" RUNTESTFLAGS="$(RUNTESTFLAGS)" \
            check-parallel-$* \
index cfe3bab6f8cc199453cab8eae476afd4d3a3bbed..8e45b2ee196ddb2ad69ec8b211ae5b535202569d 100644 (file)
@@ -1,3 +1,7 @@
+2011-07-13  Jason Merrill  <jason@redhat.com>
+
+       * Make-lang.in (check-c++0x): New.
+
 2011-07-13  Richard Sandiford  <richard.sandiford@linaro.org>
 
        * typeck2.c (split_nonconstant_init_1): Pass the initializer directly,
index 1b53b3875dd9e0de5d64d59445ae2e2a3c78d7d2..b9251a44099385d43930a7e78f80e9d90c5e6e83 100644 (file)
@@ -149,6 +149,10 @@ c++.srcman: doc/g++.1
 # check targets.  However, our DejaGNU framework requires 'check-g++' as its
 # entry point.  We feed the former to the latter here.
 check-c++ : check-g++
+# Run the testsute in C++0x mode.
+check-c++0x:
+       $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) --tool_opts=-std=gnu++0x" \
+         TESTSUITEDIR="$(TESTSUITEDIR).c++0x" check-g++
 check-c++-subtargets : check-g++-subtargets
 # List of targets that can use the generic check- rule and its // variant.
 lang_checks += check-g++
index f6fd7f0ebb11c6a034f48126807751e0532cba8f..eebf940c8a2481ec9c0a838b0a1a16971ce34782 100644 (file)
@@ -1,3 +1,18 @@
+2011-07-13  Jason Merrill  <jason@redhat.com>
+
+       * lib/g++.exp (${tool}_option_help, ${tool}_option_proc): Remove.
+       * lib/lto.exp (lto_prune_warns): Prune warning about -std=c++0x
+       when compiling C files.
+       * g++.dg/debug/dwarf2/lineno-simple1.C: Avoid constexpr ctor.
+       * g++.dg/debug/dwarf2/pr44641.C: Avoid constexpr ctor.
+       * g++.dg/ext/utf-dflt.C: Specify -std=c++98.
+       * g++.dg/lookup/anon2.C: Likewise.
+       * g++.dg/tree-ssa/copyprop.C: Likewise.
+       * g++.old-deja/g++.jason/rfg27.C: Likewise.
+       * g++.dg/init/vector1.C: Ignore narrowing errors.
+       * g++.dg/torture/pr35526.C: Likewise.
+       * g++.old-deja/g++.ext/arrnew.C: Prune C++0x warning.
+
 2011-07-13  Janne Blomqvist  <jb@gcc.gnu.org>
 
        PR libfortran/49296
index e0ef7f71ca34188eea6271a2e2e669f4bd990a1c..3fcc4f235fc7f64d6ab774e659c264f6f72fc668 100644 (file)
@@ -2,6 +2,7 @@
 // { dg-options "-g -O0 -dA" }
 
 struct C {  // { dg-function-on-line {_ZN1CC[12]Ev} }
+  int i;
   virtual void
   foo() {}  // { dg-function-on-line _ZN1C3fooEv }
 };
index 2df002f6b007c05ee88952dfd8cd09ce5087549f..7b061eb0e6b5d2e446495c0ed643e1392ea89215 100644 (file)
@@ -13,26 +13,27 @@ typedef MisplacedDbg<Arg*> Typedef2;
 typedef MisplacedDbg<Full> Typedef3;
 
 template<typename T> struct Base  {
+  int i;
   virtual ~Base() {
   }
 };
 
 template <>
 struct MisplacedDbg<Full>  // { dg-function-on-line {_ZN12MisplacedDbgI4FullEC[12]Ev} }
-                           // { dg-function-on-line {_ZN12MisplacedDbgI4FullED0Ev} { target *-*-* } 21 }
+                           // { dg-function-on-line {_ZN12MisplacedDbgI4FullED0Ev} { target *-*-* } 22 }
 
     : public Base<int> {
 };
 
 template <class T>
 struct MisplacedDbg<T*>  // { dg-function-on-line {_ZN12MisplacedDbgIP3ArgEC[12]Ev} }
-                         // { dg-function-on-line {_ZN12MisplacedDbgIP3ArgED0Ev} { target *-*-* } 28 }
+                         // { dg-function-on-line {_ZN12MisplacedDbgIP3ArgED0Ev} { target *-*-* } 29 }
     : public Base<int> {
 };
 
 template <class A>
 struct MisplacedDbg  // { dg-function-on-line {_ZN12MisplacedDbgI3ArgEC[12]Ev} }
-                     // { dg-function-on-line {_ZN12MisplacedDbgI3ArgED0Ev} { target *-*-* } 34 }
+                     // { dg-function-on-line {_ZN12MisplacedDbgI3ArgED0Ev} { target *-*-* } 35 }
     : public Base<int> {
 };
 
index 942f2b26d38bbc50b5e46256a1ccee8e7b24e5a0..04849bfbf0625e5bc0da862aa61e691abbc5e6b7 100644 (file)
@@ -2,7 +2,7 @@
 /* Expected errors for char16_t/char32_t in default std. */
 /* Ensure u and U prefixes are parsed as separate tokens in default std. */
 /* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=c++98" } */
 
 const static char16_t  c0      = 'a';  /* { dg-error "not name a type" } */
 const static char32_t  c1      = 'a';  /* { dg-error "not name a type" } */
index ce4f40c90829a118e6440f3467b46070f85662d2..f33df2a92faab4c03b31374235a08f092bd9153b 100644 (file)
@@ -1,6 +1,7 @@
 // PR c++/19263
 // { dg-do run }
-// { dg-options "-O2" }
+// { dg-options "-O2 -fpermissive" }
+// { dg-prune-output "narrowing" }
 
 typedef signed char v8qi __attribute__ ((vector_size (8)));
 
index d556ba0034a18eda18bfc7459ac0bfcda8c164ff..4984307e454089b7e837580e2107b1a377a9a351 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile }
-// { dg-options "" }
+// { dg-options "-std=c++98" }
 
 // Make sure we issue a diagnostic if a type with no linkage is used
 // to declare a a variable that has linkage.
index d0a8e6d2c2ff2bdd306f7fa58b27c9815feaf225..2d745b50eddd16366ade211ace7cfac924ba9b7b 100644 (file)
@@ -1,4 +1,6 @@
 /* { dg-do compile } */
+// { dg-options "-fpermissive" }
+// { dg-prune-output "narrowing" }
 
 extern void *memcpy (void *__dest, __const void *__src, __SIZE_TYPE__  __n);
 
index 5ba193618dd5b62f8ddfddf2221443539e382f55..b30e5ddc5ba7080ae3b6567d9228f6080f851643 100644 (file)
@@ -1,7 +1,7 @@
 // PR 39548 verify ssa ICE
 //
 // { dg-do compile { target { lp64 } } }
-// { dg-options  "-Wno-error -fno-exceptions -fno-tree-vrp -O2 -fprofile-generate  -finline-limit=500"  } 
+// { dg-options  "-Wno-error -fno-exceptions -fno-tree-vrp -O2 -fprofile-generate  -finline-limit=500 -std=c++98"  }
 //
 
 #include <map>
@@ -85,7 +85,7 @@ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
     while (__cur != 0)  { _M_delete_node(__cur); }
   }
 }
-template<class _Key, class _Tp, class _HashFn = hash<_Key>,     class _EqualKey = equal_to<_Key>, class _Alloc = allocator<_Tp> >   struct hash_map     {
+template<class _Key, class _Tp, class _HashFn = ::hash<_Key>,     class _EqualKey = equal_to<_Key>, class _Alloc = allocator<_Tp> >   struct hash_map     {
   typedef hashtable<pair<const _Key, _Tp>,_Key, _HashFn,    _Select1st<pair<const _Key, _Tp> >,    _EqualKey, _Alloc> _Ht;
   _Ht _M_ht;
   typedef typename _Ht::key_type key_type;
index ea3f420147028c9ba8b6a83fc5642b4ef3180f1a..0c37eb1e9fc8b84ba70b7b794ff4b41723a1c6b7 100644 (file)
@@ -2,7 +2,8 @@
 // { dg-options "" }
 // PRMS Id: 4992
 
+// { dg-prune-output "extended init" }
+
 int *f(){
   return new int[1] = { 1 };   // { dg-error "lvalue" "err" }
-  // { dg-warning "extended init" "warn" { target *-*-* } 6 }
 }
index dd20747efab0e04814201e37035c0040a64fa37e..a598c341f59e0dbacdd8785eac6d0124f35f93cb 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do assemble  }
-// { dg-options "-pedantic-errors" }
+// { dg-options "-std=c++98 -pedantic-errors" }
 // Don't compile this one with -Wno-long-long...
 
 short volatile short var_0_2;              /* { dg-error "" } duplicate short */
index 70c7aed468868e72e7529ad5d2b456674ef738e4..81c4398a4e1a558cb04d95cc9917017d7110b498 100644 (file)
@@ -307,28 +307,3 @@ proc g++_target_compile { source dest type options } {
 
     return $result
 }
-
-#
-# ${tool}_option_help
-#
-
-proc ${tool}_option_help { } {
-    send_user " --additional_options,OPTIONS\t\tUse OPTIONS to compile the testcase files. OPTIONS should be comma-separated.\n"
-}
-
-#
-# ${tool}_option_proc
-#
-
-proc ${tool}_option_proc { option } {
-    if [regexp "^--additional_options," $option] {
-       global gpp_compile_options
-       regsub "--additional_options," $option "" option
-       foreach x [split $option ","] {
-           lappend gpp_compile_options "additional_flags=$x"
-       }
-       return 1
-    } else {
-       return 0
-    }
-}
index 762dbbf82de9daeb2d0fb0e39038752a4f6b15ff..f1f3a68631a0601ef87325ab6a3e2b91bb562696 100644 (file)
@@ -25,6 +25,9 @@ proc lto_prune_warns { text } {
     # Many tests that use visibility will still pass on platforms that don't support it.
     regsub -all "(^|\n)\[^\n\]*: warning: visibility attribute not supported in this configuration; ignored\[^\n\]*" $text "" text
 
+    # Allow mixed-language LTO tests to pass with make check-c++0x
+    regsub -all "(^|\n)\[^\n\]*: warning: command line option '-std=\[^\n\]*" $text "" text
+
     # And any stray location lines.
     regsub -all "(^|\n)\[^\n\]*: In function \[^\n\]*" $text "" text
     regsub -all "(^|\n)In file included from \[^\n\]*" $text "" text
This page took 0.1727 seconds and 5 git commands to generate.