OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/tags/gnu-src/gcc-4.5.1/gcc-4.5.1-or32-1.0rc1/gcc/testsuite/g++.old-deja/g++.warn
    from Rev 305 to Rev 338
    Reverse comparison

Rev 305 → Rev 338

/inline.C
0,0 → 1,69
// { dg-do assemble }
// { dg-options "-ansi -pedantic-errors -Winline -O1" }
 
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 9 Mar 2000 <nathan@codesourcery.com>
 
// derived from a bug report by Benjamin Kosnik <bkoz@cygnus.com>
 
// __FUNCTION__ was erroneously causing us to issue a `cannot inline'
// diagnostic, even though we'd (a) inlined it, (b) been forced to issue an
// out of line body by taking it's address, (c) not used __FUNCTION__.
 
inline void wibble ()
{}
 
inline void wobble ()
{} // { dg-bogus "" } cannot inline
 
void bar (void (*)());
 
void bar1 ()
{
wibble (); // can be inlined
void (*ptr) () = wobble; // force out of line issue
bar (ptr); // make sure we make use of it
}
 
struct B
{
void mwibble ()
{}
void mwobble ()
{} // { dg-bogus "" } cannot inline
static void swibble ()
{}
static void swobble ()
{} // { dg-bogus "" } cannot inline
};
 
void bar (void (B::*)());
 
void bar2 ()
{
B::swibble (); // can be inlined
void (*ptr) () = &B::swobble; // force out of line issue
bar (ptr); // make sure we make use of it
}
 
void bar3 (B *b)
{
b->mwibble (); // can be inlined
void (B::*ptr) () = &B::mwobble; // force out of line issue
bar (ptr); // make sure we make use of it
}
 
struct C
{
virtual void vwobble ()
{} // { dg-bogus "" } cannot inline
};
 
void bar4 ()
{
C c; // force issue of C's vtable etc
}
inline.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: impint.C =================================================================== --- impint.C (nonexistent) +++ impint.C (revision 338) @@ -0,0 +1,56 @@ +// { dg-do assemble } +// { dg-options "-Wconversion" } +// Copyright (C) 2000 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 24 Feb 2000 + +// derived from a bug report by Johan Kuipers +// initialization to 'int' from to 'double' We expect consistent warnings +// whenever a float is implicitly truncated to int + +struct X +{ + X (int); + X (int, int); +}; + +void foo (int); +void wibble (int); +void wibble (int, int); +void punk (int = 3.5); +void rock (); +void rock (int, int = 3.5); + +void fn () +{ + X x1(3.5); // { dg-warning "" } double to int + X x2(3.5f); // { dg-warning "" } float to int + X x3(1, 3.5); // { dg-warning "" } double to int + X x4(1, 3.5f); // { dg-warning "" } float to int + X x5(3.5, 1); // { dg-warning "" } double to int + X x6(3.5f, 1); // { dg-warning "" } float to int + + X y1 = 3.5; // { dg-warning "" } double to int + X y2 = 3.5f; // { dg-warning "" } float to int + + int j1 (3.5); // { dg-warning "" } double to int + int j2 (3.5f); // { dg-warning "" } float to int + + int k1 = 3.5; // { dg-warning "" } double to int + int k2 = 3.5f; // { dg-warning "" } float to int + + j1 = 3.5; // { dg-warning "" } double to int + j2 = 3.5f; // { dg-warning "" } float to int + + foo (3.5); // { dg-warning "" } double to int + foo (3.5f); // { dg-warning "" } float to int + + wibble (3.5); // { dg-warning "" } double to int + wibble (3.5f); // { dg-warning "" } float to int + wibble (1, 3.5); // { dg-warning "" } double to int + wibble (1, 3.5f); // { dg-warning "" } float to int + wibble (3.5, 1); // { dg-warning "" } double to int + wibble (3.5f, 1); // { dg-warning "" } float to int + + punk (); // { dg-warning "" } double to int + rock (1); // { dg-warning "" } double to int +}
impint.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: impint2.C =================================================================== --- impint2.C (nonexistent) +++ impint2.C (revision 338) @@ -0,0 +1,69 @@ +// { dg-do assemble } +// { dg-options "-Wconversion" } + +// Copyright (C) 2000 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 6 Mar 2000 + +// initialization to 'int' from to 'double' We expect consistent warnings +// whenever a float is implicitly truncated to int, make sure references +// don't confuse us, as Gerald Pfeifer found out. + +struct X +{ + X (int const &); + X (int const &, int const &); +}; + +void foo (int const &); +void wibble (int const &); +void wibble (int const &, int const &); +void punk (int const & = 3.5f); // { dg-warning "" } in passing +void rock (); +void rock (int const &, int const & = 3.5f); // { dg-warning "" } in passing + +void fn () +{ + X x2(3.5f); // { dg-warning "" } float to int + X x4(1, 3.5f); // { dg-warning "" } float to int + X x6(3.5f, 1); // { dg-warning "" } float to int + + X y2 = 3.5f; // { dg-warning "" } float to int + + int j2 (3.5f); // { dg-warning "" } float to int + + int k2 = 3.5f; // { dg-warning "" } float to int + + j2 = 3.5f; // { dg-warning "" } float to int + + foo (3.5f); // { dg-warning "" } float to int + + wibble (3.5f); // { dg-warning "" } float to int + wibble (1, 3.5f); // { dg-warning "" } float to int + wibble (3.5f, 1); // { dg-warning "" } float to int + + punk (); // { dg-warning "" } float to int + rock (1); // { dg-warning "" } float to int +} + +// and make sure we really know when something's unsigned +void foo () +{ + X x2(-1); + X x4(1, -1); + X x6(-1, 1); + + X y2 = -1; + + int j2 (-1); + + int k2 = -1; + + j2 = -1; + + foo (-1); + + wibble (-1); + wibble (1, -1); + wibble (-1, 1); + +}
impint2.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: cast-align1.C =================================================================== --- cast-align1.C (nonexistent) +++ cast-align1.C (revision 338) @@ -0,0 +1,27 @@ +// { dg-do assemble { target sparc-*-* } } +// { dg-options "-ansi -pedantic-errors -Wcast-align" } + + +// Copyright (C) 1999 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 7 Dec 1999 + +// converting a T * to void * does not need a complete T, and doesn't +// increase alignment requirements. + +struct X; +struct Y; +struct Z {double m;}; + +void f3 (X *xp, Z *zp) +{ + (void *)xp; + (void *)zp; + (Y *)xp; + (Y *)zp; + (Z *)xp; +} + +void f4 (char *ptr) +{ + (Z *)ptr; // { dg-warning "" } alignment +}
cast-align1.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: virt1.C =================================================================== --- virt1.C (nonexistent) +++ virt1.C (revision 338) @@ -0,0 +1,10 @@ +// { dg-do assemble } +// { dg-options "-Woverloaded-virtual" } + +struct A { + virtual void f(); // { dg-warning "" } hidden +}; + +struct B: public A { + void f(int); // { dg-warning "" } by this +};
virt1.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: flow1.C =================================================================== --- flow1.C (nonexistent) +++ flow1.C (revision 338) @@ -0,0 +1,14 @@ +// { dg-do assemble } +// { dg-options "-Wreturn-type" } +// Test that we don't get a warning about flowing off the end. + +struct A { + ~A (); +}; + +int f() +{ + A a1[2]; + A a2[2]; + return 1234567; +}
flow1.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: iomanip.C =================================================================== --- iomanip.C (nonexistent) +++ iomanip.C (revision 338) @@ -0,0 +1,13 @@ +// { dg-do assemble } +// { dg-options "-O -Winline" } +// Bug: g++ wouldn't inline op<< because it was an explicit instantiation. +// Origin: Jason Merrill + +#include +#include + +void +f() +{ + std::cout << std::setw(3); +}
iomanip.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.