aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/opt/cfg5.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/opt/cfg5.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/opt/cfg5.C40
1 files changed, 40 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/opt/cfg5.C b/gcc-4.9/gcc/testsuite/g++.dg/opt/cfg5.C
new file mode 100644
index 000000000..a4bc8eea9
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/opt/cfg5.C
@@ -0,0 +1,40 @@
+/* PR rtl-optimization/34035 */
+/* Origin: Janis Johnson <janis@gcc.gnu.org> */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -fnon-call-exceptions -ffast-math -fno-gcse" } */
+
+class One {
+public:
+ One () { e[0] = e[1] = 0.0; }
+ double e[2];
+};
+
+template <class T>
+class Two {
+public:
+ Two();
+private:
+ T *data;
+ int arraySize;
+};
+
+template <class T>
+Two<T>::Two() {
+ data = new T[arraySize];
+}
+
+class Three {
+protected:
+ Two<One> data;
+};
+
+class Four : public Three {
+public:
+ Four ();
+ void Foo (int n);
+};
+
+Four :: Four (){
+ Foo (1);
+}