URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
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++.dg/ipa
- from Rev 301 to Rev 338
- ↔ Reverse comparison
Rev 301 → Rev 338
/pr43812.C
0,0 → 1,38
/* { dg-do compile } */ |
/* { dg-options "-O -fwhole-program -fipa-cp" } */ |
|
typedef float scoord_t; |
typedef scoord_t sdist_t; |
typedef sdist_t dist_t; |
template<typename T> class TRay { }; |
typedef TRay<dist_t> Ray; |
class BBox { }; |
class RenderContext { }; |
class RefCounted { |
public: |
void deref () const { |
if (--ref_count <= 0) { |
delete this; |
} |
} |
mutable int ref_count; |
}; |
template<class T> class Ref { |
public: |
~Ref () { |
if (obj) obj->deref (); |
} |
T *obj; |
}; |
class Material : public RefCounted { }; |
class Surface { |
public: |
virtual ~Surface () { } |
class IsecInfo { }; |
virtual const IsecInfo *intersect (Ray &ray, RenderContext &context) const; |
Ref<const Material> material; |
}; |
class LocalSurface : public Surface { |
virtual BBox bbox () const; |
}; |
BBox LocalSurface::bbox () const { } |
pr43812.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: iinline-1.C
===================================================================
--- iinline-1.C (nonexistent)
+++ iinline-1.C (revision 338)
@@ -0,0 +1,49 @@
+/* Verify that simple indirect calls are inlined even without early
+ inlining.. */
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining" } */
+/* { dg-add-options bind_pic_locally } */
+
+extern void non_existent (const char *, int);
+
+class String
+{
+private:
+ const char *data;
+
+public:
+ String (const char *d) : data(d)
+ {}
+
+ int funcOne (int delim) const;
+ int printStuffTwice (int delim) const;
+};
+
+
+int String::funcOne (int delim) const
+{
+ int i;
+ for (i = 0; i < delim; i++)
+ non_existent(data, i);
+
+ return 1;
+}
+
+int docalling (int (String::* f)(int delim) const)
+{
+ String S ("muhehehe");
+
+ return (S.*f)(4);
+}
+
+int main (int argc, char *argv[])
+{
+ int i = 0;
+ while (i < 1000)
+ i += docalling (&String::funcOne);
+ non_existent ("done", i);
+ return 0;
+}
+
+/* { dg-final { scan-ipa-dump "String::funcOne\[^\\n\]*inline copy in int main" "inline" } } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
iinline-1.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: 20090113-1.C
===================================================================
--- 20090113-1.C (nonexistent)
+++ 20090113-1.C (revision 338)
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+struct S1 {
+ S1() { }
+};
+
+struct S2 {
+ int n;
+ S1* p;
+ void f() {
+ p = new S1[n = 1];
+ }
+};
+
+struct S3 {
+ S2 s2;
+ void g() {
+ s2.f();
+ }
+};
+
+void h() {
+ S3().g();
+}
20090113-1.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