This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Fix treelang tests
- From: ja2morri at csclub dot uwaterloo dot ca (James A. Morrison)
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 19 Jul 2005 10:40:59 -0400
- Subject: [committed] Fix treelang tests
Hi,
This patch fixes the var_defs.tree testcase which started failing when
unit-at-a-time was enabled at -O1.
--
Thanks,
Jim
http://www.csclub.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim
? dup.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/treelang/ChangeLog,v
retrieving revision 1.12
diff -u -p -r1.12 ChangeLog
--- ChangeLog 23 Mar 2005 02:35:35 -0000 1.12
+++ ChangeLog 19 Jul 2005 14:36:55 -0000
@@ -1,3 +1,8 @@
+2005-07-19 James A. Morrrison <phython@gcc.gnu.org>
+
+ * compile/var_defs.tree: Remove duplicate variable.
+ * compile/var_defs-2.tree: Add duplicate variable test.
+
2005-03-22 James A. Morrison <phython@gcc.gnu.org>
* compile/memory.tree: New test.
Index: compile/var_defs-2.tree
===================================================================
RCS file: compile/var_defs-2.tree
diff -N compile/var_defs-2.tree
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ compile/var_defs-2.tree 19 Jul 2005 14:36:55 -0000
@@ -0,0 +1,20 @@
+// { dg-do compile }
+external_definition int first_nonzero (int arg5, int arg6);
+
+first_nonzero
+{
+ automatic int y;
+ automatic int y; // { dg-error "Duplicate" }
+ if (arg5)
+ {
+ return arg5;
+ }
+ else
+ {
+ automatic int j;
+ j = arg6;
+ return j;
+ }
+ return arg6;
+}
+
Index: compile/var_defs.tree
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/treelang/compile/var_defs.tree,v
retrieving revision 1.3
diff -u -p -r1.3 var_defs.tree
--- compile/var_defs.tree 26 Feb 2005 16:09:33 -0000 1.3
+++ compile/var_defs.tree 19 Jul 2005 14:36:55 -0000
@@ -2,7 +2,6 @@
// { dg-options "-Wuninitialized -O" }
external_definition void boring (int arg0);
external_definition char condition (char arg1, char arg2);
-external_definition int first_nonzero (int arg5, int arg6);
boring
{
@@ -23,21 +22,5 @@ condition
return j; // { dg-warning "uninitialized" }
}
}
-
-first_nonzero
-{
- automatic int y;
- automatic int y; // { dg-error "Duplicate" }
- if (arg5)
- {
- return arg5;
- }
- else
- {
- automatic int j;
- j = arg6;
- return j;
- }
- return arg6;
}