[9/10] debug-early merge: testsuite changes
diff mbox

Message ID 554C05C0.8040301@redhat.com
State New
Headers show

Commit Message

Aldy Hernandez May 8, 2015, 12:39 a.m. UTC

Comments

Mike Stump May 8, 2015, 5:54 p.m. UTC | #1
On May 7, 2015, at 5:39 PM, Aldy Hernandez <aldyh@redhat.com> wrote:

So, I don’t feel there is anything in there for me to review, I’d like the front-end maintainer to review.

Patch
diff mbox

gcc/testsuite/

	* g++.dg/cpp0x/pr57101.C: Add warning.
	* g++.dg/debug/dwarf2/dwarf4-typedef.C: Same.
	* g++.dg/ext/visibility/anon7.C: Same.
	* g++.dg/ipa/pr63587-2.C: Same.
	* g++.dg/opt/dump1.C: Same.
	* g++.dg/opt/pr59622-3.C: Same.
	* g++.dg/opt/pr59622.C: Same.
	* g++.dg/torture/pr46383.C: Same.
	* gcc.dg/dfp/pragma-float-const-decimal64-8.c: Same.
	* g++.dg/debug/dwarf2/auto1.C: Adjust for early dwarf.
	* gfortran.dg/intent_out_8.f90: Same.
	* gfortran.dg/warn_target_lifetime_3.f90: Same.

diff --git a/gcc/testsuite/g++.dg/cpp0x/pr57101.C b/gcc/testsuite/g++.dg/cpp0x/pr57101.C
index c0fc966..1db444e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr57101.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr57101.C
@@ -160,7 +160,7 @@  namespace std
     typedef _Alloc allocator_type;
     template < typename _Key_compare > struct _Rb_tree_impl
     {
-      _Rb_tree_impl (_Key_compare, _Node_allocator);
+      _Rb_tree_impl (_Key_compare, _Node_allocator); // { dg-warning "used but never defined" }
     };
     _Rb_tree_impl < _Compare > _M_impl;
   _Rb_tree (_Compare __comp, allocator_type __a):
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/auto1.C b/gcc/testsuite/g++.dg/debug/dwarf2/auto1.C
index e38334b..c04e923 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/auto1.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/auto1.C
@@ -10,14 +10,14 @@ 
 // .uleb128 0x5    # (DIE (0x4c) DW_TAG_unspecified_type)
 // .long   .LASF6  # DW_AT_name: "auto"
 //...
+// .uleb128 0x9    # (DIE (0x87) DW_TAG_base_type)
+// .ascii "int\0"  # DW_AT_name
+//...
 // .uleb128 0x7    # (DIE (0x57) DW_TAG_subprogram)
 // .long   0x33    # DW_AT_specification
 // .long   0x87    # DW_AT_type
-//...
-// .uleb128 0x9    # (DIE (0x87) DW_TAG_base_type)
-// .ascii "int\0"  # DW_AT_name
 
-// { dg-final { scan-assembler "a1.*(0x\[0-9a-f]+)\[^\n\r]*DW_AT_type.*\\1. DW_TAG_unspecified_type.*DW_AT_specification\[\n\r]{1,2}\[^\n\r]*(0x\[0-9a-f]+)\[^\n\r]*DW_AT_type.*\\2. DW_TAG_base_type" } }
+// { dg-final { scan-assembler "a1.*(0x\[0-9a-f]+)\[^\n\r]*DW_AT_type.*\\1. DW_TAG_unspecified_type.*(0x\[0-9a-f]+). DW_TAG_base_type.*DW_AT_specification\[\n\r]{1,2}\[^\n\r]*\\2\[^\n\r]*DW_AT_type" } }
 
 struct A
 {
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/dwarf4-typedef.C b/gcc/testsuite/g++.dg/debug/dwarf2/dwarf4-typedef.C
index 89a6bb4..cd1a0af 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/dwarf4-typedef.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/dwarf4-typedef.C
@@ -6,7 +6,7 @@ 
 namespace {
 
 struct A {
-  virtual ~A();
+  virtual ~A(); // { dg-warning "used but never defined" }
 };
 
 struct B : public A {
diff --git a/gcc/testsuite/g++.dg/ext/visibility/anon7.C b/gcc/testsuite/g++.dg/ext/visibility/anon7.C
index 0c42ea8..1aa239e 100644
--- a/gcc/testsuite/g++.dg/ext/visibility/anon7.C
+++ b/gcc/testsuite/g++.dg/ext/visibility/anon7.C
@@ -4,7 +4,7 @@ 
 namespace
 {
   struct A {
-    static int bar ();
+    static int bar ();		// { dg-error "used but never defined" "" }
     static int i;		// { dg-error "used, but not defined" "" { xfail *-*-* } }
     static int j;
     static int k;
diff --git a/gcc/testsuite/g++.dg/ipa/pr63587-2.C b/gcc/testsuite/g++.dg/ipa/pr63587-2.C
index f31c5bd..a15f17e 100644
--- a/gcc/testsuite/g++.dg/ipa/pr63587-2.C
+++ b/gcc/testsuite/g++.dg/ipa/pr63587-2.C
@@ -178,7 +178,7 @@  public:
   }
 };
 template <typename AttributeValueT>
-attribute_actor<AttributeValueT> attr (attribute_name);
+attribute_actor<AttributeValueT> attr (attribute_name); // { dg-warning "used but never defined" }
 terminal<>::type stream;
 template <typename LeftT, typename ImplT> class attribute_output_terminal
 {
diff --git a/gcc/testsuite/g++.dg/opt/dump1.C b/gcc/testsuite/g++.dg/opt/dump1.C
index d263f18..f74d024 100644
--- a/gcc/testsuite/g++.dg/opt/dump1.C
+++ b/gcc/testsuite/g++.dg/opt/dump1.C
@@ -311,7 +311,7 @@  namespace std __attribute__ ((__visibility__ ("default")))
     typename __add_ref<
                       typename tuple_element<__i, tuple<_Elements...>>::type
                     >::type
-    get(tuple<_Elements...>& __t) noexcept;
+    get(tuple<_Elements...>& __t) noexcept; // { dg-warning "used but never defined" }
   template<std::size_t... _Indexes>
     struct _Index_tuple
     {};
@@ -386,7 +386,7 @@  namespace std __attribute__ ((__visibility__ ("default")))
     };
   template<typename _Callable, typename... _Args>
     typename _Bind_simple_helper<_Callable, _Args...>::__type
-    __bind_simple(_Callable&& __callable, _Args&&... __args)
+    __bind_simple(_Callable&& __callable, _Args&&... __args)  // { dg-warning "used but never defined" }
   ;
   union _Any_data
   ;
@@ -403,7 +403,7 @@  namespace std __attribute__ ((__visibility__ ("default")))
       {
       protected:
  static _Functor*
- _M_get_pointer(const _Any_data& __source)
+ _M_get_pointer(const _Any_data& __source)  // { dg-warning "used but never defined" }
  ;
       };
   };
@@ -510,7 +510,7 @@  namespace std __attribute__ ((__visibility__ ("default")))
         _S_construct(_Alloc&, _Tp* __p, _Args&&... __args)
  { ::new((void*)__p) _Tp(std::forward<_Args>(__args)...); }
       static pointer
-      allocate(_Alloc& __a, size_type __n)
+      allocate(_Alloc& __a, size_type __n)  // { dg-warning "used but never defined" }
       ;
       template<typename _Tp, typename... _Args>
  static auto construct(_Alloc& __a, _Tp* __p, _Args&&... __args)
diff --git a/gcc/testsuite/g++.dg/opt/pr59622-3.C b/gcc/testsuite/g++.dg/opt/pr59622-3.C
index 0af8605..94d66aa 100644
--- a/gcc/testsuite/g++.dg/opt/pr59622-3.C
+++ b/gcc/testsuite/g++.dg/opt/pr59622-3.C
@@ -8,7 +8,7 @@  namespace
 {
   struct A
   {
-    virtual C foo ();
+    virtual C foo (); // { dg-warning "used but never defined" }
     C bar () { return foo (); }
   };
 }
diff --git a/gcc/testsuite/g++.dg/opt/pr59622.C b/gcc/testsuite/g++.dg/opt/pr59622.C
index 1d8e998..f62cf41 100644
--- a/gcc/testsuite/g++.dg/opt/pr59622.C
+++ b/gcc/testsuite/g++.dg/opt/pr59622.C
@@ -6,7 +6,7 @@  namespace
 {
   struct A
   {
-    virtual int foo ();
+    virtual int foo (); // { dg-warning "used but never defined" }
     int bar () { return foo (); }
   };
 }
diff --git a/gcc/testsuite/g++.dg/torture/pr46383.C b/gcc/testsuite/g++.dg/torture/pr46383.C
index 2b61039..e4810c5 100644
--- a/gcc/testsuite/g++.dg/torture/pr46383.C
+++ b/gcc/testsuite/g++.dg/torture/pr46383.C
@@ -69,9 +69,9 @@  template < class Tr, class Derived, class Element, class Previous, class Triangu
   Mesher_level(Previous_level& previous)
     : previous_level(previous)
   { }
-  Vertex_handle insert(Point p, Zone& z) ;
-  Zone conflicts_zone(const Point& p, Element e) ;
-  Element get_next_element() ;
+  Vertex_handle insert(Point p, Zone& z) ; // { dg-warning "used but never defined" }
+  Zone conflicts_zone(const Point& p, Element e) ; // { dg-warning "used but never defined" }
+  Element get_next_element() ; // { dg-warning "used but never defined" }
   template <class Mesh_visitor> void before_insertion(Element& e, const Point& p, Zone& zone, Mesh_visitor visitor) {
     visitor.before_insertion(e, p, zone);
   }
@@ -171,7 +171,7 @@  template <typename Tr> struct Triangulation_mesher_level_traits_3
       tr.is_infinite(f) ;
       new_facet<false>(f);
     }
-    template <bool remove_from_complex_if_not_in_restricted_Delaunay> void new_facet (const Facet& f) ;
+    template <bool remove_from_complex_if_not_in_restricted_Delaunay> void new_facet (const Facet& f) ; // { dg-warning "used but never defined" }
     void after_insertion_handle_opposite_facet (const Facet& f) {
       after_insertion_handle_incident_facet (f);
     }
diff --git a/gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-8.c b/gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-8.c
index 39d38c1..a54c900 100644
--- a/gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-8.c
+++ b/gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-8.c
@@ -145,7 +145,7 @@  here:
 double
 f10 (void)
 {
-  void foo10 (void)
+  void foo10 (void) /* { dg-warning "defined but not used" } */
   {
     a = 1.0;
   }
diff --git a/gcc/testsuite/gfortran.dg/intent_out_8.f90 b/gcc/testsuite/gfortran.dg/intent_out_8.f90
index 674d833..6360314 100644
--- a/gcc/testsuite/gfortran.dg/intent_out_8.f90
+++ b/gcc/testsuite/gfortran.dg/intent_out_8.f90
@@ -10,7 +10,7 @@  end type t
 
 contains
 
-  subroutine foo(x)
+  subroutine foo(x)             ! { dg-warning "defined but not used" }
     type(t), intent(out) :: x
   end subroutine
 
diff --git a/gcc/testsuite/gfortran.dg/warn_target_lifetime_3.f90 b/gcc/testsuite/gfortran.dg/warn_target_lifetime_3.f90
index 9113a88..6c8ea5b 100644
--- a/gcc/testsuite/gfortran.dg/warn_target_lifetime_3.f90
+++ b/gcc/testsuite/gfortran.dg/warn_target_lifetime_3.f90
@@ -10,7 +10,7 @@  subroutine test
   integer, target :: t
   p => t
 contains
-  subroutine sub()
+  subroutine sub()               ! { dg-warning "defined but not used" }
     if (p /= 0) return
   end subroutine
 end subroutine
@@ -22,7 +22,7 @@  contains
     integer, target :: t2
     p2 => t2 ! { dg-warning "Pointer at .1. in pointer assignment might outlive the pointer target" }
   contains
-    subroutine sub()
+    subroutine sub()             ! { dg-warning "defined but not used" }
       if (p2 /= 0) return
     end subroutine
   end subroutine