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.
@@ -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):
@@ -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
{
@@ -6,7 +6,7 @@
namespace {
struct A {
- virtual ~A();
+ virtual ~A(); // { dg-warning "used but never defined" }
};
struct B : public A {
@@ -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;
@@ -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
{
@@ -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)
@@ -8,7 +8,7 @@ namespace
{
struct A
{
- virtual C foo ();
+ virtual C foo (); // { dg-warning "used but never defined" }
C bar () { return foo (); }
};
}
@@ -6,7 +6,7 @@ namespace
{
struct A
{
- virtual int foo ();
+ virtual int foo (); // { dg-warning "used but never defined" }
int bar () { return foo (); }
};
}
@@ -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);
}
@@ -145,7 +145,7 @@ here:
double
f10 (void)
{
- void foo10 (void)
+ void foo10 (void) /* { dg-warning "defined but not used" } */
{
a = 1.0;
}
@@ -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
@@ -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