summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/trivial.C
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/g++.old-deja/g++.jason/trivial.C
downloadcbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2
cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/trivial.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/trivial.C71
1 files changed, 71 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/trivial.C b/gcc/testsuite/g++.old-deja/g++.jason/trivial.C
new file mode 100644
index 000000000..13ef9dc61
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/trivial.C
@@ -0,0 +1,71 @@
+// { dg-do assemble }
+// PRMS Id: 3665
+
+//-------------------------------------------------------------
+// Referential declaration within class
+//
+// Imbeded below is the invocation of the compiler and the error
+// message
+//
+// This compiles successfully with both the xlC and CFRONT compilers
+// This was reviewed with Clem Dickey and we agree that it appears to
+// be a Cygnus compiler problem.
+//-------------------------------------------------------------
+/*
+$ make bug.reference.o
+ /usr/p3/bin/i960-vxworks-g++ `getsrc bug.reference.C` -I. -Iinc1 -Iinc2
+ -I/vw5.0.3/h -I/vw5.0.3/h/i960 -I/usr/p3/lib/gcc-lib/i960-vxworks/cygnus-2.3.3
+/include -I/usr/p3/lib/gcc-lib/i960-vxworks/cygnus-2.3.3-930417/include -I/usr/p
+3/lib/i960-vxworks/include -I/usr/p3/i960-vxworks/include -c -DCPU_FAMILY=I960
+-DCPU=I960CA -mca -mold-align -g3 -O1 -DASSERT_ON -nostdinc -nostdinc++ -MD
+./bug.reference.C: In method `class1::class1 (long unsigned int, long unsigned i
+nt **&)':
+./bug.reference.C:43: cannot convert type `long unsigned int **'
+./bug.reference.C:43: to type `long unsigned int *[]&'
+make: 1254-004 The error code from the last command is 1.
+*/
+
+// typedefs
+typedef unsigned long u32;
+typedef u32 *ul[16];
+
+// class defs
+class class1 {
+ u32 var1;
+ class1(const class1 &); // Copy constructor
+ class1& operator=(const class1 &); // operator= member function
+public:
+ class1(u32, ul&);
+ ul &ulref;
+ ~class1() {}
+};
+
+
+// member function defs
+class1::class1(u32 u, ul &l) : var1(u), ulref(l)
+{}
+
+/* ===========================================================================
+Note: The following is a "work around" that allows the successful compilation.
+
+
+// typedefs
+typedef unsigned long u32;
+typedef u32 *ul[16];
+
+// class defs
+class class1 {
+ u32 var1;
+ class1(const class1 &); // Copy constructor
+ class1& operator=(const class1 &); // operator= member function
+public:
+ class1(u32, ul*);
+ ul &ulref;
+ ~class1() {}
+};
+
+
+// member function defs
+class1::class1(u32 u, ul *l) : var1(u), ulref(*l)
+{}
+============================================================================*/