OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/trunk/gnu-src/gcc-4.2.2/gcc/testsuite/g++.dg/rtti
    from Rev 149 to Rev 154
    Reverse comparison

Rev 149 → Rev 154

/typeid1.C
0,0 → 1,11
#include <typeinfo>
 
struct A {
virtual ~A() {}
};
 
int main() {
A* a = new A;
typeid(*a).name();
}
 
typeid1.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: incomplete1.C =================================================================== --- incomplete1.C (nonexistent) +++ incomplete1.C (revision 154) @@ -0,0 +1,12 @@ +// PR c++/28109 +// { dg-do compile } + +#include + +struct A; + +void foo() +{ + A a; // { dg-error "incomplete type" } + typeid (a); +}
incomplete1.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: tinfo1.C =================================================================== --- tinfo1.C (nonexistent) +++ tinfo1.C (revision 154) @@ -0,0 +1,40 @@ +// Test if a local definition is in a linkonce/comdat section. +// { dg-do compile } +// { dg-final { scan-assembler "_ZTIP9CTemplateIhE\[: \t\n\]" } } +// { dg-final { scan-assembler-not "(.globl|.global)\[ \]+_ZTIP9CTemplateIhE" } } +// { dg-final { scan-assembler-not ".section\[^\n\r\]*_ZTIP9CTemplateIhE\[^\n\r\]*" } } + + +namespace std +{ + class type_info + { + protected: + const char *__name; + + protected: + explicit type_info(const char *__n): __name(__n) { } + + public: + const char* name() const + { return __name; } + }; +} + +template +class CTemplate +{ +}; + +class CSecondModule { +public: + CSecondModule(); + +private: + const CTemplate *m_variable; typedef CTemplate m_variable_type; +}; + +CSecondModule::CSecondModule() +{ + typeid(const_cast(m_variable)).name() != 0; +}
tinfo1.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: typeid2.C =================================================================== --- typeid2.C (nonexistent) +++ typeid2.C (revision 154) @@ -0,0 +1,15 @@ +// { dg-do run } + +#include + +template const char *print_type (const T &) { + return typeid(T).name(); +} + +/* no template */ void pp1 (int) {} +template void pp2 (X) {} + +int main () { + if (print_type (&pp1) != print_type (&pp2)) + return 1; +}
typeid2.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: no-rtti-voidptr.C =================================================================== --- no-rtti-voidptr.C (nonexistent) +++ no-rtti-voidptr.C (revision 154) @@ -0,0 +1,21 @@ +// { dg-do compile } +// { dg-options "-fno-rtti" } + +// PR C++/28687 + +struct A { + virtual ~A() { } +}; + +struct B : A { +}; + +A* f() +{ + return new B(); +} + +int main() +{ + void* b = dynamic_cast(f()); +}
no-rtti-voidptr.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: crash1.C =================================================================== --- crash1.C (nonexistent) +++ crash1.C (revision 154) @@ -0,0 +1,10 @@ +// { dg-do compile } + +// Copyright (C) 2002 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 29 Sep 2002 + +// PR 7788. ICE + +class foo; +extern const foo bar; +class bar;
crash1.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: typeid3.C =================================================================== --- typeid3.C (nonexistent) +++ typeid3.C (revision 154) @@ -0,0 +1,11 @@ +#include + +template