This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[3.3/3.4 PATCH] fix broken test g++.dg/template/spec10.C
- From: Bob Wilson <bwilson at tensilica dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 6 Oct 2003 14:43:08 -0700
- Subject: [3.3/3.4 PATCH] fix broken test g++.dg/template/spec10.C
- Organization: Tensilica, Inc.
This test is broken on both the mainline and the 3.3 branch because the
expected exit value is 0x3000 instead of zero. I don't know why this doesn't
show up for all the targets, but I noticed it when testing the xtensa-elf
target with a simulator. I guess the test harness doesn't always pay
attention to the exit value. I also fixed up the indentation.
OK for mainline?
Is this appropriate for the branch, and if so, will someone approve it?
2003-10-06 Bob Wilson <bob.wilson@acm.org>
* g++.dg/template/spec10.C: Set exit value to zero on success. Fix
indentation.
Index: spec10.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.dg/template/spec10.C,v
retrieving revision 1.2
diff -u -r1.2 spec10.C
--- spec10.C 3 Jun 2003 13:01:44 -0000 1.2
+++ spec10.C 6 Oct 2003 21:18:41 -0000
@@ -9,19 +9,19 @@
class o
{
public:
- template<typename T> static void do_add(T* p, T v);
+ template<typename T> static void do_add(T* p, T v);
};
template<>
template<typename T>
inline void o<32>::do_add(T* p, T v)
{
- *p += v;
+ *p += v;
}
int main()
{
- int a = 0x1000;
- o<32>().do_add<int>(&a, 0x2000);
- return a;
+ int a = 0x1000;
+ o<32>().do_add<int>(&a, 0x2000);
+ return (a != 0x3000);
}