mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-10 09:37:02 +08:00
g++-dg.exp (g++-dg-test): Add "repo" option.
* lib/g++-dg.exp (g++-dg-test): Add "repo" option. (dg-gpp-additional-sources): New function. (dg-gpp-additional-files): Likewise. * lib/g++.exp (additional_sources): New variable. (additional_files): Likewise. (g++_target_compile): Deal with them. * lib/old-dejagnu.exp: Remove. * g++.old-deja/old-deja.exp: Use dg.exp, not old-dejagnu.exp. * g++.old-deja: Revise all tests to use dg commands. From-SVN: r66317
This commit is contained in:
parent
44c8a5f8d8
commit
6481daa971
@ -1,3 +1,15 @@
|
||||
2003-04-30 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* lib/g++-dg.exp (g++-dg-test): Add "repo" option.
|
||||
(dg-gpp-additional-sources): New function.
|
||||
(dg-gpp-additional-files): Likewise.
|
||||
* lib/g++.exp (additional_sources): New variable.
|
||||
(additional_files): Likewise.
|
||||
(g++_target_compile): Deal with them.
|
||||
* lib/old-dejagnu.exp: Remove.
|
||||
* g++.old-deja/old-deja.exp: Use dg.exp, not old-dejagnu.exp.
|
||||
* g++.old-deja: Revise all tests to use dg commands.
|
||||
|
||||
2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
||||
|
||||
PR c++/9432, c++/9528
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Skip if not target: i?86-*-linux* i?86-*-freebsd*
|
||||
// Special g++ Options: -malign-double
|
||||
// { dg-do run { target i?86-*-linux* i?86-*-freebsd* } }
|
||||
// { dg-options "-malign-double" }
|
||||
// Origin: Alex Samuel <samuel@codesourcery.com>
|
||||
|
||||
/* Test the data layout of C aggregates by checking aggregate size and
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Skip if not target: i?86-*-linux* i?86-*-freebsd*
|
||||
// Special g++ Options: -malign-double
|
||||
// { dg-do run { target i?86-*-linux* i?86-*-freebsd* } }
|
||||
// { dg-options "-malign-double" }
|
||||
// Origin: Alex Samuel <samuel@codesourcery.com>
|
||||
|
||||
/* Test the size and alignment of fundamental C types for compliance
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// Origin: Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
#if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Skip if not target: i?86-*-linux* i?86-*-freebsd*
|
||||
// Special g++ Options: -malign-double
|
||||
// { dg-do run { target i?86-*-linux* i?86-*-freebsd* } }
|
||||
// { dg-options "-malign-double" }
|
||||
// Origin: Alex Samuel <samuel@codesourcery.com>
|
||||
|
||||
/* Test the layout of bitfields in C aggretagtes for compliance with
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
//
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 11 Apr 2001 <nathan@codesourcery.com>
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// Test __cxa_vec routines
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 7 Apr 2000 <nathan@nathan@codesourcery.com>
|
||||
|
@ -1,4 +1,5 @@
|
||||
// Special g++ Options: -w
|
||||
// { dg-do run }
|
||||
// { dg-options "-w" }
|
||||
// Origin: Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
#if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 12 Apr 2001 <nathan@codesourcery.com>
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 12 Apr 2001 <nathan@codesourcery.com>
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// Origin: Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
#if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
// Origin: Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
struct S {};
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// Test to see that primary bases are selected correctly.
|
||||
// Origin: Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 4 February 2001 <nathan@codesourcery.com>
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 4 February 2001 <nathan@codesourcery.com>
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 4 February 2001 <nathan@codesourcery.com>
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 4 February 2001 <nathan@codesourcery.com>
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// Test rtti pointer flags
|
||||
// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 15 Apr 2000 <nathan@nathan@codesourcery.com>
|
||||
|
@ -1,4 +1,5 @@
|
||||
// Special g++ Options: -fno-strict-aliasing
|
||||
// { dg-do run }
|
||||
// { dg-options "-fno-strict-aliasing" }
|
||||
// Origin: Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
/* Generally, the lowest bit of the ptr is used to indicate whether a
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 16 Jan 2001 <nathan@codesourcery.com>
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 5 Jun 2001 <nathan@codesourcery.com>
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 5 Jun 2001 <nathan@codesourcery.com>
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 9 Jun 2001 <nathan@codesourcery.com>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
//
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 12 Jun 2001 <nathan@codesourcery.com>
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
//
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 12 Jun 2001 <nathan@codesourcery.com>
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// Build don't run
|
||||
//
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
|
@ -1,4 +1,5 @@
|
||||
// Special g++ Options: -w
|
||||
// { dg-do run }
|
||||
// { dg-options "-w" }
|
||||
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 24 Jul 2001 <nathan@codesourcery.com>
|
||||
|
@ -1,4 +1,5 @@
|
||||
// Special g++ Options: -ansi -pedantic-errors -w
|
||||
// { dg-do run }
|
||||
// { dg-options "-ansi -pedantic-errors -w" }
|
||||
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 14 Jun 2001 <nathan@codesourcery.com>
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// Test rtti hint flags
|
||||
// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 3 Apr 2000 <nathan@nathan@codesourcery.com>
|
||||
|
@ -1,5 +1,6 @@
|
||||
// { dg-do run }
|
||||
// { dg-options "-fno-strict-aliasing" }
|
||||
// Test various aspects of vtable layout.
|
||||
// Special g++ Options: -fno-strict-aliasing
|
||||
// Origin: Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
#if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
|
||||
|
@ -1,5 +1,6 @@
|
||||
// { dg-do run }
|
||||
// { dg-options "-fno-strict-aliasing" }
|
||||
// Origin: Mark Mitchell <mark@codesourcery.com>
|
||||
// Special g++ Options: -fno-strict-aliasing
|
||||
|
||||
#if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
|
||||
|
||||
|
@ -1,8 +1,10 @@
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
// { dg-do run }
|
||||
// { dg-gpp-additional-files "vtable3.h" }
|
||||
|
||||
// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 4 February 2001 <nathan@codesourcery.com>
|
||||
|
||||
// Check constructor vtables work.
|
||||
// Additional files: vtable3.h
|
||||
|
||||
#define A_EMPTY
|
||||
#define B1_EMPTY
|
||||
|
@ -1,8 +1,10 @@
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
// { dg-do run }
|
||||
// { dg-gpp-additional-files "vtable3.h" }
|
||||
|
||||
// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 4 February 2001 <nathan@codesourcery.com>
|
||||
|
||||
// Check constructor vtables work.
|
||||
// Additional files: vtable3.h
|
||||
|
||||
#define B1_EMPTY
|
||||
#define B2_EMPTY
|
||||
|
@ -1,8 +1,10 @@
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
// { dg-do run }
|
||||
// { dg-gpp-additional-files "vtable3.h" }
|
||||
|
||||
// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 4 February 2001 <nathan@codesourcery.com>
|
||||
|
||||
// Check constructor vtables work.
|
||||
// Additional files: vtable3.h
|
||||
|
||||
#define A_EMPTY
|
||||
#define B2_EMPTY
|
||||
|
@ -1,8 +1,10 @@
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
// { dg-do run }
|
||||
// { dg-gpp-additional-files "vtable3.h" }
|
||||
|
||||
// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 4 February 2001 <nathan@codesourcery.com>
|
||||
|
||||
// Check constructor vtables work.
|
||||
// Additional files: vtable3.h
|
||||
|
||||
#define A_EMPTY
|
||||
#define B1_EMPTY
|
||||
|
@ -1,8 +1,10 @@
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
// { dg-do run }
|
||||
// { dg-gpp-additional-files "vtable3.h" }
|
||||
|
||||
// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 4 February 2001 <nathan@codesourcery.com>
|
||||
|
||||
// Check constructor vtables work.
|
||||
// Additional files: vtable3.h
|
||||
|
||||
#define A_EMPTY
|
||||
#define B1_EMPTY
|
||||
|
@ -1,8 +1,10 @@
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
// { dg-do run }
|
||||
// { dg-gpp-additional-files "vtable3.h" }
|
||||
|
||||
// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 4 February 2001 <nathan@codesourcery.com>
|
||||
|
||||
// Check constructor vtables work.
|
||||
// Additional files: vtable3.h
|
||||
|
||||
#define A_EMPTY
|
||||
#define B1_EMPTY
|
||||
|
@ -1,8 +1,10 @@
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
// { dg-do run }
|
||||
// { dg-gpp-additional-files "vtable3.h" }
|
||||
|
||||
// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 4 February 2001 <nathan@codesourcery.com>
|
||||
|
||||
// Check constructor vtables work.
|
||||
// Additional files: vtable3.h
|
||||
|
||||
#define A_EMPTY
|
||||
#define B1_EMPTY
|
||||
|
@ -1,8 +1,10 @@
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
// { dg-do run }
|
||||
// { dg-gpp-additional-files "vtable3.h" }
|
||||
|
||||
// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 4 February 2001 <nathan@codesourcery.com>
|
||||
|
||||
// Check constructor vtables work.
|
||||
// Additional files: vtable3.h
|
||||
|
||||
#define A_EMPTY
|
||||
#define B1_EMPTY
|
||||
|
@ -1,8 +1,10 @@
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
// { dg-do run }
|
||||
// { dg-gpp-additional-files "vtable3.h" }
|
||||
|
||||
// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 4 February 2001 <nathan@codesourcery.com>
|
||||
|
||||
// Check constructor vtables work.
|
||||
// Additional files: vtable3.h
|
||||
|
||||
#define B1_EMPTY
|
||||
#define B2_EMPTY
|
||||
|
@ -1,8 +1,10 @@
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
// { dg-do run }
|
||||
// { dg-gpp-additional-files "vtable3.h" }
|
||||
|
||||
// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 4 February 2001 <nathan@codesourcery.com>
|
||||
|
||||
// Check constructor vtables work.
|
||||
// Additional files: vtable3.h
|
||||
|
||||
#define B1_EMPTY
|
||||
#define B2_EMPTY
|
||||
|
@ -1,6 +1,6 @@
|
||||
// { dg-do assemble }
|
||||
// 981203 bkoz
|
||||
// g++/13478
|
||||
// Build don't link:
|
||||
|
||||
class A {};
|
||||
class AData {};
|
||||
@ -26,8 +26,8 @@ const hand_table Agent::table_1[] =
|
||||
{
|
||||
{0, &Agent::table_2},
|
||||
{first, &Agent::foo},
|
||||
{last, &(hand)Agent::foo} // ERROR - no match
|
||||
}; // ERROR - cannot convert
|
||||
{last, &(hand)Agent::foo} // { dg-error "" } no match
|
||||
}; // { dg-error "" } cannot convert
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// { dg-do assemble }
|
||||
// 981203 bkoz
|
||||
// g++/13523
|
||||
// Build don't link:
|
||||
|
||||
template<typename T> class latin_america;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// { dg-do assemble }
|
||||
// 981203 bkoz
|
||||
// g++/13908
|
||||
// Build don't link:
|
||||
|
||||
class chile
|
||||
{
|
||||
@ -17,5 +17,5 @@ void bar (chile* pobj, pmf pmethod)
|
||||
{
|
||||
//-edg: expected member name
|
||||
//-g++: taking address of bound pointer-to-member expression
|
||||
foo = (void*) &(pobj->*pmethod); // ERROR -
|
||||
foo = (void*) &(pobj->*pmethod); // { dg-error "" }
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// { dg-do assemble }
|
||||
// 981203 bkoz
|
||||
// g++/14309
|
||||
// test for global functions, mf's, and templatized mf's.
|
||||
// Build don't link:
|
||||
|
||||
static int fooe_1(void) { return 5; }
|
||||
static int fooe_2(int x = fooe_1()) { return x; }
|
||||
|
@ -1,6 +1,6 @@
|
||||
// { dg-do assemble }
|
||||
// 981203 bkoz
|
||||
// g++/14664 - test
|
||||
// Build don't link:
|
||||
|
||||
char foo[26];
|
||||
|
||||
@ -8,7 +8,7 @@ void bar()
|
||||
{
|
||||
//-g++: incompatible types in assignment of 'const char[]' to 'char[]'
|
||||
//-edg: expression must be a modifiable lvalue
|
||||
foo = "0123456789012345678901234"; // ERROR - // ERROR -
|
||||
foo = "0123456789012345678901234"; // { dg-error "" } // ERROR -
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// { dg-do assemble }
|
||||
// { dg-options "-fpermissive -w" }
|
||||
// 981203 bkoz
|
||||
// g++/14664 + test
|
||||
// Build don't link:
|
||||
// Special g++ Options: -fpermissive -w
|
||||
|
||||
char foo[26];
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// 981203 bkoz
|
||||
// g++/14687
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// { dg-do assemble }
|
||||
// { dg-options "-Wno-pointer-arith" }
|
||||
// 981203 bkoz
|
||||
// g++/15054
|
||||
// Build don't link:
|
||||
// Special g++ Options: -Wno-pointer-arith
|
||||
// note that -pedantic also turns on this warning
|
||||
|
||||
void cuba(void) {
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// 981203 bkoz
|
||||
// g++/15071
|
||||
// gcc invocation fails to link in libstdc++
|
||||
|
@ -1,7 +1,7 @@
|
||||
// { dg-do assemble }
|
||||
// { dg-options "-Wnon-virtual-dtor -Weffc++" }
|
||||
// 981203 bkoz
|
||||
// g++/15309
|
||||
// Build don't link:
|
||||
// Special g++ Options: -Wnon-virtual-dtor -Weffc++
|
||||
|
||||
class bahamian {
|
||||
public:
|
||||
@ -10,7 +10,7 @@ public:
|
||||
};
|
||||
|
||||
class miami : public bahamian
|
||||
{ // WARNING - // WARNING -
|
||||
{ // { dg-warning "" } // WARNING -
|
||||
public:
|
||||
miami ();
|
||||
~miami ();
|
||||
|
@ -1,9 +1,9 @@
|
||||
// { dg-do assemble }
|
||||
// { dg-options "-Wnon-virtual-dtor -Weffc++" }
|
||||
// 981203 bkoz
|
||||
// g++/15309
|
||||
// Build don't link:
|
||||
// Special g++ Options: -Wnon-virtual-dtor -Weffc++
|
||||
|
||||
class bermuda { // WARNING - // WARNING -
|
||||
class bermuda { // { dg-warning "" } // WARNING -
|
||||
public:
|
||||
virtual int func1(int);
|
||||
~bermuda();
|
||||
|
@ -1,6 +1,7 @@
|
||||
// { dg-do run }
|
||||
// { dg-options "-fno-const-strings" }
|
||||
// 981203 bkoz
|
||||
// g++/15351 - test
|
||||
// Special g++ Options: -fno-const-strings
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
// { dg-do run }
|
||||
// { dg-options "-fconst-strings" }
|
||||
// 981203 bkoz
|
||||
// g++/15351 + test
|
||||
// Special g++ Options: -fconst-strings
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// { dg-do assemble }
|
||||
// { dg-options "-Wsign-promo" }
|
||||
// 981203 bkoz
|
||||
// g++/15756 test1
|
||||
// Build don't link:
|
||||
// Special g++ Options: -Wsign-promo
|
||||
|
||||
enum e_value { first = 0, next = 30 };
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// { dg-do assemble }
|
||||
// { dg-options "-Wsign-promo" }
|
||||
// 981203 bkoz
|
||||
// g++/15756 test2
|
||||
// Build don't link:
|
||||
// Special g++ Options: -Wsign-promo
|
||||
// this test may only be valid for 32bit targets at present
|
||||
|
||||
#include <limits.h>
|
||||
@ -31,8 +31,8 @@ struct caracas {
|
||||
|
||||
int main ()
|
||||
{
|
||||
caracas obj_ei ( enum_int ); // WARNING -
|
||||
caracas obj_eui ( enum_uint ); // WARNING -
|
||||
caracas obj_ei ( enum_int ); // { dg-warning "" }
|
||||
caracas obj_eui ( enum_uint ); // { dg-warning "" }
|
||||
caracas obj_i ( i );
|
||||
caracas obj_ui ( ui );
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// { dg-do assemble }
|
||||
// 981203 bkoz
|
||||
// g++/15799 test1
|
||||
// Build don't link:
|
||||
|
||||
/*
|
||||
15799.cpp: In function `void foo()':
|
||||
@ -15,15 +15,15 @@ typedef unsigned long uint_32;
|
||||
class sanjose {
|
||||
public:
|
||||
sanjose();
|
||||
sanjose(const sanjose&); // ERROR - candidate
|
||||
sanjose(int_8 value); // ERROR - // ERROR -
|
||||
sanjose(uint_32 value); // ERROR - // ERROR -
|
||||
sanjose(const sanjose&); // { dg-error "" } candidate
|
||||
sanjose(int_8 value); // { dg-error "" } // ERROR -
|
||||
sanjose(uint_32 value); // { dg-error "" } // ERROR -
|
||||
};
|
||||
|
||||
enum { first, last};
|
||||
|
||||
void foo(void) {
|
||||
sanjose obj(first); // ERROR - // ERROR -
|
||||
sanjose obj(first); // { dg-error "" } // ERROR -
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,17 +1,17 @@
|
||||
// { dg-do assemble }
|
||||
// 981203 bkoz
|
||||
// g++/15800 - test
|
||||
// Build don't link:
|
||||
|
||||
struct panama {
|
||||
panama();
|
||||
panama(panama &);
|
||||
panama& operator=(panama&); // ERROR - // ERROR -
|
||||
panama& operator=(panama&); // { dg-error "" } // ERROR -
|
||||
};
|
||||
|
||||
extern panama dig();
|
||||
|
||||
void foo() {
|
||||
panama obj;
|
||||
obj = dig(); // ERROR - // ERROR -
|
||||
obj = dig(); // { dg-error "" } // ERROR -
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// { dg-do assemble }
|
||||
// 981203 bkoz
|
||||
// g++/15800 + test
|
||||
// Build don't link:
|
||||
|
||||
struct panama {
|
||||
panama();
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// 981203 bkoz
|
||||
// g++/15822
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// { dg-do assemble }
|
||||
// 981203 bkoz
|
||||
// g++/16077
|
||||
// Build don't link:
|
||||
|
||||
class nicaragua;
|
||||
struct colombia {
|
||||
@ -20,7 +20,7 @@ public:
|
||||
void peace(const colombia&);
|
||||
|
||||
void foo(nicaragua& b) {
|
||||
peace(b); // WARNING - // WARNING -
|
||||
peace(b); // { dg-warning "" } // WARNING -
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// { dg-do assemble }
|
||||
// 981203 bkoz
|
||||
// g++/16567
|
||||
// Build don't link:
|
||||
|
||||
typedef bool Bool;
|
||||
typedef unsigned char Uint8;
|
||||
@ -35,7 +35,7 @@ void foo(void) {
|
||||
control *fp = &obj;
|
||||
e_ms result;
|
||||
|
||||
result = (e_ms) fp->foo_1; // ERROR - // ERROR -
|
||||
result = (e_ms) fp->foo_1; // { dg-error "" } // ERROR -
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// { dg-do assemble }
|
||||
// 981204 bkoz
|
||||
// g++/17922
|
||||
// Build don't link:
|
||||
|
||||
class base { };
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// { dg-do assemble }
|
||||
// 981204 bkoz
|
||||
// g++/17930
|
||||
// Build don't link:
|
||||
|
||||
char const one[] = "test";
|
||||
char const two[] = one; // ERROR - // ERROR -
|
||||
char const two[] = one; // { dg-error "" } // ERROR -
|
||||
|
@ -1,6 +1,6 @@
|
||||
// { dg-do assemble }
|
||||
// 981204 bkoz
|
||||
// g++/18208
|
||||
// Build don't link:
|
||||
|
||||
typedef unsigned int uint_32;
|
||||
|
||||
@ -17,9 +17,9 @@ void foo( )
|
||||
puertorico obj;
|
||||
|
||||
// Bug using static_cast<>
|
||||
ui = static_cast<uint_32>(obj); // ERROR - // ERROR -
|
||||
ui = static_cast<uint_32>(obj); // { dg-error "" } // ERROR -
|
||||
|
||||
// Bug when missing the pair of braces
|
||||
ui = (uint_32) obj.f; // ERROR - // ERROR -
|
||||
ui = (uint_32) obj.f; // { dg-error "" } // ERROR -
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
//980323 bkoz
|
||||
//test for bools with inclusive ors
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
//980324 bkoz
|
||||
//test for bool and bitwise ands
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
//980610 bkoz
|
||||
// example 1: buggy
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
//980610 bkoz
|
||||
// example 2: ok
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
// prms-id: 12475
|
||||
|
||||
#include <limits.h>
|
||||
@ -11,4 +11,4 @@
|
||||
#error "Unsupported test -- add new constants."
|
||||
#endif
|
||||
|
||||
enum huh { start =-TEST, next }; // WARNING -
|
||||
enum huh { start =-TEST, next }; // { dg-warning "" }
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Build don't link:
|
||||
// Special g++ Options: -Wno-deprecated
|
||||
// { dg-do assemble }
|
||||
// { dg-options "-Wno-deprecated" }
|
||||
// prms-id: 13417
|
||||
|
||||
class Foo {
|
||||
@ -7,5 +7,5 @@ public:
|
||||
explicit Foo (int){}
|
||||
};
|
||||
Foo f(10);
|
||||
Foo blat() return f(4){} // ERROR - named return value
|
||||
Foo blat() return f(4){} // { dg-error "" } named return value
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
// prms-id: 13721
|
||||
|
||||
class A
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
// 980604 bkoz
|
||||
// 3.4.5 Class member access p 4
|
||||
// nested and non-nested calls, no dtors
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
//980529 bkoz
|
||||
//3.4.5 Class member access via pointer and non-pointer
|
||||
// non-nested dtor calls
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
// prms-id: 13911
|
||||
|
||||
template<unsigned int N>
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
//980519 bad error from nathan
|
||||
//$ egcs -fhonor-std -nostdinc -c redef.C
|
||||
//redef.C:56: redefinition of default argument for `class _Traits'
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
// 980808-980824 bkoz
|
||||
// template parameter redeclaration bugs
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
// 01
|
||||
// declared friend template
|
||||
template <class T4>// ERROR - .*
|
||||
template <class T4>// { dg-error "" } .*
|
||||
class Xone {
|
||||
protected:
|
||||
T4* next;
|
||||
@ -32,13 +32,13 @@ public:
|
||||
// can also do template-decl and then can ditch the foward-declaration
|
||||
// template <class T5> friend bool isequal (Xone<T5>& lhs, Xone<T5>& rhs);
|
||||
// this is not ok:
|
||||
template <class T4> friend bool isequal (Xone<T4>& lhs, Xone<T4>& rhs);// ERROR - .*
|
||||
template <class T4> friend bool isequal (Xone<T4>& lhs, Xone<T4>& rhs);// { dg-error "" } .*
|
||||
};
|
||||
|
||||
|
||||
// 02
|
||||
// nested template class
|
||||
template <class T6>// ERROR - .*
|
||||
template <class T6>// { dg-error "" } .*
|
||||
class Xtwo {
|
||||
protected:
|
||||
T6* next;
|
||||
@ -48,7 +48,7 @@ public:
|
||||
Xtwo(): next(0), prev(0), value(1999){}
|
||||
Xtwo(T6 init): value(init) {}
|
||||
|
||||
template <class T6> class nested {// ERROR - .*
|
||||
template <class T6> class nested {// { dg-error "" } .*
|
||||
T6 value;
|
||||
public:
|
||||
nested(): value( T6(0)) {}
|
||||
@ -58,7 +58,7 @@ public:
|
||||
|
||||
// 03
|
||||
// member templates
|
||||
template <class T8>// ERROR - .*
|
||||
template <class T8>// { dg-error "" } .*
|
||||
class Xthree {
|
||||
protected:
|
||||
T8* next;
|
||||
@ -68,7 +68,7 @@ public:
|
||||
Xthree(): next(0), prev(0), value(1999){}
|
||||
Xthree(T8 init): value(init) {}
|
||||
|
||||
template <class T8> T8 comp_ge(T8 test) {// ERROR - .*
|
||||
template <class T8> T8 comp_ge(T8 test) {// { dg-error "" } .*
|
||||
T8 local_value;
|
||||
if (local_value > value)
|
||||
return local_value;
|
||||
@ -80,8 +80,8 @@ public:
|
||||
|
||||
// 04
|
||||
// local names (14.6.1 p 4)
|
||||
template <class T10, int i> struct Xfour {// ERROR - .*
|
||||
int T10; // ERROR - .*
|
||||
template <class T10, int i> struct Xfour {// { dg-error "" } .*
|
||||
int T10; // { dg-error "" } .*
|
||||
void f(){
|
||||
char T10;
|
||||
}
|
||||
@ -94,15 +94,15 @@ template <class T12, int i> struct Xfive {
|
||||
void f();
|
||||
};
|
||||
|
||||
template <class T13, int i> void Xfive<T13,i>::f() {// ERROR - .*
|
||||
int T13; // ERROR - .*
|
||||
template <class T13, int i> void Xfive<T13,i>::f() {// { dg-error "" } .*
|
||||
int T13; // { dg-error "" } .*
|
||||
int T12; //should be ok
|
||||
}
|
||||
|
||||
|
||||
// 06
|
||||
// multiple names at the same level
|
||||
template <class T14, class T14> class Xsix { // ERROR - .*
|
||||
template <class T14, class T14> class Xsix { // { dg-error "" } .*
|
||||
private:
|
||||
public:
|
||||
void f();
|
||||
@ -111,14 +111,14 @@ public:
|
||||
|
||||
// 07
|
||||
// multiple names, one in template parameter one in class-name
|
||||
template <class T12> class T12; // ERROR - .*
|
||||
template <class T12> class T12; // { dg-error "" } .*
|
||||
|
||||
|
||||
// 08
|
||||
// with multiple template params, and second (third) one is redeclared
|
||||
template <class T16, int i, class T161> class Xseven { // ERROR - .*
|
||||
template <class T16, int i, class T161> class Xseven { // { dg-error "" } .*
|
||||
private:
|
||||
char T161; // ERROR - .*
|
||||
char T161; // { dg-error "" } .*
|
||||
public:
|
||||
template <class U>
|
||||
friend bool fooy(U u);
|
||||
@ -126,8 +126,8 @@ public:
|
||||
template <class T161>
|
||||
friend bool foo(T161 u)
|
||||
{
|
||||
Xseven<T161, 5, int> obj; // ERROR - .*
|
||||
return (obj.inst == u.inst); // ERROR - .*
|
||||
Xseven<T161, 5, int> obj; // { dg-error "" } .*
|
||||
return (obj.inst == u.inst); // { dg-error "" } .*
|
||||
}
|
||||
|
||||
};
|
||||
@ -158,27 +158,27 @@ struct S1
|
||||
// 10
|
||||
// check for non-type parameters, should still be able to redeclare?
|
||||
// local names (14.6.1 p 4)
|
||||
template <class T18, int i> class Xten {// ERROR - .*
|
||||
float i; // ERROR - .*
|
||||
template <class T18, int i> class Xten {// { dg-error "" } .*
|
||||
float i; // { dg-error "" } .*
|
||||
};
|
||||
|
||||
|
||||
// 11
|
||||
// declared friend template, non-type parameters
|
||||
template <long l>// ERROR - .*
|
||||
template <long l>// { dg-error "" } .*
|
||||
class Xeleven {
|
||||
public:
|
||||
template <long l> friend bool isequal (Xeleven<5> lhs, Xeleven<5> rhs); // ERROR - .*
|
||||
template <long l> friend bool isequal (Xeleven<5> lhs, Xeleven<5> rhs); // { dg-error "" } .*
|
||||
};
|
||||
|
||||
|
||||
|
||||
// 12
|
||||
// nested template class, non-type parameters
|
||||
template <long l>// ERROR - .*
|
||||
template <long l>// { dg-error "" } .*
|
||||
class Xtwelve {
|
||||
public:
|
||||
template <long l> class nested {// ERROR - .
|
||||
template <long l> class nested {// { dg-error "" } .
|
||||
long value;
|
||||
public:
|
||||
nested(): value(0) {}
|
||||
@ -188,14 +188,14 @@ public:
|
||||
|
||||
// 13
|
||||
// member templates, non-type parameters
|
||||
template <long l>// ERROR - .*
|
||||
template <long l>// { dg-error "" } .*
|
||||
struct Xthirteen {
|
||||
template <long l> long comp_ge(long test) {// ERROR - .
|
||||
template <long l> long comp_ge(long test) {// { dg-error "" } .
|
||||
long local_value;
|
||||
if (local_value > value) // ERROR - .*
|
||||
if (local_value > value) // { dg-error "" } .*
|
||||
return local_value;
|
||||
else
|
||||
return value; // ERROR - .*
|
||||
return value; // { dg-error "" } .*
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
// 980827 bkoz
|
||||
// template parameter redeclaration bugs, part two:
|
||||
// template template params and expanded template non-type parms
|
||||
@ -18,27 +18,27 @@
|
||||
|
||||
// 14
|
||||
// declared friend template (v3, template type parameters)
|
||||
template <class T4>// ERROR - .*
|
||||
template <class T4>// { dg-error "" } .*
|
||||
class Xfourteen {
|
||||
protected:
|
||||
T4 value;
|
||||
public:
|
||||
Xfourteen(T4 init): value(init) {}
|
||||
template <template <typename T4> class T5> // ERROR - .*
|
||||
template <template <typename T4> class T5> // { dg-error "" } .*
|
||||
friend bool isequal (Xfourteen<int>& lhs, Xfourteen<int>& rhs);
|
||||
};
|
||||
|
||||
|
||||
// 15
|
||||
// nested template class (v3, template type parameters)
|
||||
template <class T6>// ERROR - .*
|
||||
template <class T6>// { dg-error "" } .*
|
||||
class Xfifteen {
|
||||
protected:
|
||||
T6 value;
|
||||
public:
|
||||
Xfifteen(T6 init): value(init) {}
|
||||
|
||||
template <template <typename T6> class T7> class nested {// ERROR - .*
|
||||
template <template <typename T6> class T7> class nested {// { dg-error "" } .*
|
||||
int value;
|
||||
public:
|
||||
nested(): value( int(0)) {}
|
||||
@ -48,14 +48,14 @@ public:
|
||||
|
||||
// 16
|
||||
// member templates (v3, template type parameters)
|
||||
template <class T8>// ERROR - .*
|
||||
template <class T8>// { dg-error "" } .*
|
||||
class Xsixteen {
|
||||
protected:
|
||||
T8 value;
|
||||
public:
|
||||
Xsixteen(T8 init): value(init) {}
|
||||
|
||||
template <template <typename T8> class T9> int comp_ge(int test) {// ERROR - .*
|
||||
template <template <typename T8> class T9> int comp_ge(int test) {// { dg-error "" } .*
|
||||
int local_value;
|
||||
if (local_value > value)
|
||||
return local_value;
|
||||
@ -88,21 +88,21 @@ public:
|
||||
|
||||
// 18
|
||||
// more template template redecl tests
|
||||
template <typename T14, template <typename T15> class C12>// ERROR - .*
|
||||
template <typename T14, template <typename T15> class C12>// { dg-error "" } .*
|
||||
class Xeighteen {
|
||||
protected:
|
||||
C12<T14> value;
|
||||
int C12; // ERROR - .*
|
||||
int C12; // { dg-error "" } .*
|
||||
};
|
||||
|
||||
|
||||
// 19
|
||||
// more template template redecl tests
|
||||
template <typename T16, template <typename T17> class C14>// ERROR - .*
|
||||
template <typename T16, template <typename T17> class C14>// { dg-error "" } .*
|
||||
class Xnineteen{
|
||||
protected:
|
||||
C14<T16> value;
|
||||
template <class C14> class nested {// ERROR - .*
|
||||
template <class C14> class nested {// { dg-error "" } .*
|
||||
T16 value;
|
||||
public:
|
||||
nested(): value( T16(0)) {}
|
||||
@ -137,8 +137,8 @@ template <class T17, int i> struct Xtwenty {
|
||||
// non-type template parameters v1: enum
|
||||
enum my_enum {my_A = 45, my_B, my_C};
|
||||
|
||||
template <my_enum T18> class Xtwentyone {// ERROR - .*
|
||||
float T18; // ERROR - .*
|
||||
template <my_enum T18> class Xtwentyone {// { dg-error "" } .*
|
||||
float T18; // { dg-error "" } .*
|
||||
};
|
||||
|
||||
|
||||
@ -149,30 +149,30 @@ struct base {
|
||||
int ret_gcount() {return gcount;}
|
||||
};
|
||||
|
||||
template <class T20, base* b> class Xtwentytwo {// ERROR - .*
|
||||
float b; // ERROR - .*
|
||||
template <class T20, base* b> class Xtwentytwo {// { dg-error "" } .*
|
||||
float b; // { dg-error "" } .*
|
||||
};
|
||||
|
||||
|
||||
// 23
|
||||
// non-type template parameters v2: reference to object
|
||||
template <class T20, base& b2> class Xtwentythree {// ERROR - .*
|
||||
float b2; // ERROR - .*
|
||||
template <class T20, base& b2> class Xtwentythree {// { dg-error "" } .*
|
||||
float b2; // { dg-error "" } .*
|
||||
};
|
||||
|
||||
|
||||
// 24
|
||||
// non-type template parameters v3: pointer to member
|
||||
template <class T20, int base::* b3> class Xtwentyfour {// ERROR - .*
|
||||
float b3; // ERROR - .*
|
||||
template <class T20, int base::* b3> class Xtwentyfour {// { dg-error "" } .*
|
||||
float b3; // { dg-error "" } .*
|
||||
};
|
||||
|
||||
|
||||
// 25
|
||||
// non-type template parms that use push_class_level
|
||||
template <class T22> void f1() {// ERROR - .*
|
||||
template <class T22> void f1() {// { dg-error "" } .*
|
||||
struct foo {
|
||||
enum T22 { un, du, toi }; // ERROR - .*
|
||||
enum T22 { un, du, toi }; // { dg-error "" } .*
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// { dg-do assemble }
|
||||
// 980924 bkoz
|
||||
// just a quick test for export, to make sure we are warning for it.
|
||||
// CHANGE ME when it's supported
|
||||
// Build don't link:
|
||||
|
||||
|
||||
// 14 Templates
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
// 1
|
||||
// template definition
|
||||
export template <class T> // WARNING -
|
||||
export template <class T> // { dg-warning "" }
|
||||
bool templ_one(T a) {
|
||||
if (a > 0)
|
||||
return true;
|
||||
@ -41,17 +41,17 @@ public:
|
||||
template <class T2> bool compare_ge(T2 test);
|
||||
};
|
||||
|
||||
export template <class T> // WARNING -
|
||||
export template <class T> // { dg-warning "" }
|
||||
const bool X_one<T>::is_specialized = false;
|
||||
|
||||
export template <class T> // WARNING -
|
||||
export template <class T> // { dg-warning "" }
|
||||
unsigned short X_one<T>::ret_id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
export template <class T2> // WARNING -
|
||||
export template <class T2> // { dg-warning "" }
|
||||
bool compare_ge(T2 test) {
|
||||
if (test > type) // ERROR - .*
|
||||
if (test > type) // { dg-error "" } .*
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// 980945 bkoz
|
||||
// test for correct operators at link time
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
|
||||
template <class T>
|
||||
class Foo
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
//980205 bkoz
|
||||
|
||||
//7.1.3 the typedef specifier
|
||||
@ -16,10 +16,10 @@ typedef int I;
|
||||
typedef I I;
|
||||
|
||||
//p3--cannot redefine to a different type in a given scope
|
||||
class complex2 { /* ... */ };// ERROR - .*
|
||||
typedef int complex2;// ERROR - .*
|
||||
typedef int complex3;// ERROR - .*
|
||||
class complex3 { /* ... */ };// ERROR - .*
|
||||
class complex2 { /* ... */ };// { dg-error "" } .*
|
||||
typedef int complex2;// { dg-error "" } .*
|
||||
typedef int complex3;// { dg-error "" } .*
|
||||
class complex3 { /* ... */ };// { dg-error "" } .*
|
||||
|
||||
|
||||
//p4
|
||||
@ -40,7 +40,7 @@ struct S {
|
||||
typedef struct S T;
|
||||
|
||||
S a = T(); // OK
|
||||
struct T * p; // ERROR - using typedef after struct
|
||||
struct T * p; // { dg-error "" } using typedef after struct
|
||||
|
||||
//case01
|
||||
typedef bool short;// ERROR - .*
|
||||
typedef bool short;// { dg-error "" } .*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
//980526 bkoz
|
||||
// reduced testcase for 980511 brendan qt bug
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// 980617 bkoz
|
||||
// typeid for local types
|
||||
// typeid bool vs int and enum vs int
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Build don't link:
|
||||
// Special g++ Options: -Wall -Weffc++
|
||||
// { dg-do assemble }
|
||||
// { dg-options "-Wall -Weffc++" }
|
||||
|
||||
//1 g++/12952 un-named variables in a catch block
|
||||
//Wall or Wunused should not give warnings here
|
||||
@ -88,7 +88,7 @@ public:
|
||||
virtual long retcntr() {return counter;};
|
||||
Mutex2(int i = 0): counter(i) {};
|
||||
virtual ~Mutex2() {};
|
||||
} __attribute__ ((warn)); // WARNING -
|
||||
} __attribute__ ((warn)); // { dg-warning "" }
|
||||
|
||||
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
// { dg-do assemble }
|
||||
// { dg-options "-Wredundant-decls" }
|
||||
// 980413 bkoz
|
||||
// from g++/15307, tests for -Wredundant-decls
|
||||
// for friend functions and functions
|
||||
// Build don't link:
|
||||
//Special g++ Options: -Wredundant-decls
|
||||
|
||||
|
||||
extern int foo(const char *);
|
||||
@ -23,7 +23,7 @@ class B
|
||||
class C
|
||||
{
|
||||
friend int foo(const char *);
|
||||
friend int foo(const char *); // WARNING -
|
||||
friend int foo(const char *); // { dg-warning "" }
|
||||
int foo2() {return b;}
|
||||
int b;
|
||||
};
|
||||
@ -32,7 +32,7 @@ class D
|
||||
{
|
||||
public:
|
||||
int foo2() {return b;}
|
||||
int foo2() {return b;} // ERROR -
|
||||
int foo2() {return b;} // { dg-error "" }
|
||||
int b;
|
||||
};
|
||||
|
||||
@ -40,12 +40,12 @@ class E
|
||||
{
|
||||
public:
|
||||
int foo2();
|
||||
int foo2(); // ERROR -
|
||||
int foo2(); // { dg-error "" }
|
||||
int b;
|
||||
};
|
||||
|
||||
extern int foo3(const char *); // WARNING -
|
||||
extern int foo3(const char *); // WARNING -
|
||||
extern int foo3(const char *); // { dg-warning "" }
|
||||
extern int foo3(const char *); // { dg-warning "" }
|
||||
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// { dg-do assemble }
|
||||
// { dg-options "-Wredundant-decls" }
|
||||
// 980420 bkoz
|
||||
// from g++/15307, tests for -Wredundant-decls for decls
|
||||
// Build don't link:
|
||||
// Special g++ Options: -Wredundant-decls
|
||||
|
||||
//shouldn't crash
|
||||
extern unsigned char *foo5[];
|
||||
|
@ -1,7 +1,7 @@
|
||||
// { dg-do assemble }
|
||||
// { dg-options "-Wno-non-template-friend" }
|
||||
// 980903 bkoz
|
||||
// make sure this option works
|
||||
// Build don't link:
|
||||
// Special g++ Options: -Wno-non-template-friend
|
||||
|
||||
|
||||
template<class T> class task {
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
char *stuff() {
|
||||
char array[10]; // WARNING -
|
||||
char array[10]; // { dg-warning "" }
|
||||
|
||||
return array;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
extern const int a[];
|
||||
extern const int a[];
|
||||
extern const int a[];
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do assemble }
|
||||
// prms-id: 9028
|
||||
class Foo;
|
||||
|
||||
@ -6,8 +7,8 @@ int main()
|
||||
int i=0;
|
||||
switch (i)
|
||||
{
|
||||
case ((Foo *)0): // ERROR -
|
||||
case ((Foo *)1): // ERROR -
|
||||
case ((Foo *)0): // { dg-error "" }
|
||||
case ((Foo *)1): // { dg-error "" }
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
// prms-id: 9866
|
||||
class TChar
|
||||
{
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
// prms-id: 7330
|
||||
#include <stddef.h>
|
||||
int size = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
extern "C" {
|
||||
class A {
|
||||
public:
|
||||
|
@ -1,4 +1,5 @@
|
||||
// { dg-do assemble }
|
||||
class C {
|
||||
public:
|
||||
static friend int f(); // ERROR -
|
||||
static friend int f(); // { dg-error "" }
|
||||
};
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do assemble }
|
||||
// prms-id: 5274
|
||||
class VHDLIdentifier;
|
||||
|
||||
@ -11,6 +12,6 @@ extern void form(const char *format, ... );
|
||||
int
|
||||
VHDLPackageProtoRep::thing()
|
||||
{
|
||||
form("package `%s'", (char *)actual_name()); // ERROR - can't convert from incomplete type
|
||||
form("package `%s'", (char *)actual_name()); // { dg-error "" } can't convert from incomplete type
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
class A {
|
||||
char str[10];
|
||||
public:
|
||||
@ -11,7 +11,7 @@ public:
|
||||
|
||||
class B : public A {
|
||||
public:
|
||||
char* m1 () { C::m1(); return ""; } // ERROR -
|
||||
char* m1 () { C::m1(); return ""; } // { dg-error "" }
|
||||
};
|
||||
|
||||
int main () {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
#include <stdlib.h>
|
||||
|
||||
class A {
|
||||
@ -6,7 +6,7 @@ public:
|
||||
void z();
|
||||
A(void) {}
|
||||
private:
|
||||
A(const A &) { abort(); } // ERROR -
|
||||
A(const A &) { abort(); } // { dg-error "" }
|
||||
const A& operator =(const A &) { abort(); }
|
||||
};
|
||||
|
||||
@ -20,5 +20,5 @@ void f(B b) {
|
||||
|
||||
void g() {
|
||||
B h;
|
||||
f(h); // ERROR -
|
||||
f(h); // { dg-error "" }
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Build don't link:
|
||||
// { dg-do assemble }
|
||||
|
||||
struct A {
|
||||
struct B {
|
||||
|
@ -1,3 +1,4 @@
|
||||
// { dg-do run }
|
||||
int
|
||||
main() {
|
||||
struct s
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user