This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gcc/dependence.c problem on HP-UX 10.20


On Aug 23, 2000, Albert Chin-A-Young <china@thewrittenword.com> wrote:

> With the HP-UX 10.20 commercial C compiler:
> cc -Ae -c  -DIN_GCC    -g   -DHAVE_CONFIG_H    -I. -I../../gcc
> -I../../gcc/config -I../../gcc/../include ../../gcc/dependence.c
> cc: "../../gcc/dependence.c", line 199: error 1501: Only the first
> dimension of an array may be omitted.

> Line 199 of gcc/dependence.c:
> static void ziv_test PARAMS ((subscript[], subscript[],
>   enum direction_type[][], int[][], loop*, int));

Yep, this is bogus.  Please try this patch.  I've only tested it with
GCC, so I'd appreciate it if you could run it through the compiler
that (correctly) rejects the code and let me know if the patch fixes
all instances of the problem.

Ok to install?

Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* dependence.c: Replace `[][]' with `[][MAX_SUBSCRIPTS]'.

Index: gcc/dependence.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/dependence.c,v
retrieving revision 1.1
diff -u -p -r1.1 dependence.c
--- gcc/dependence.c	2000/08/22 16:16:20	1.1
+++ gcc/dependence.c	2000/08/23 18:21:34
@@ -1,5 +1,3 @@
-/* CYGNUS LOCAL dependency analysis */
-
 /* Analyze loop dependencies
    Copyright (C) 2000 Free Software Foundation, Inc.
 
@@ -196,15 +194,19 @@ static int get_one_coefficient PARAMS ((
 static void normalize_coefficients PARAMS ((subscript[], loop*, int));
 static void classify_dependence PARAMS ((subscript[], subscript[],
 				 enum complexity_type[], int*, int));
-static void ziv_test PARAMS ((subscript[], subscript[], enum direction_type[][],
-		      int[][], loop*, int));
-static void siv_test PARAMS ((subscript[], subscript[], enum direction_type[][],
-		      int[][], loop*, int));
+static void ziv_test PARAMS ((subscript[], subscript[],
+			      enum direction_type[][MAX_SUBSCRIPTS],
+			      int[][MAX_SUBSCRIPTS], loop*, int));
+static void siv_test PARAMS ((subscript[], subscript[],
+			      enum direction_type[][MAX_SUBSCRIPTS],
+			      int[][MAX_SUBSCRIPTS], loop*, int));
 static int check_subscript_induction PARAMS ((subscript*, subscript*, loop*));
-static void gcd_test PARAMS ((subscript[], subscript[], enum direction_type[][],
-		      int[][], loop*, int));
+static void gcd_test PARAMS ((subscript[], subscript[], enum
+			      direction_type[][MAX_SUBSCRIPTS],
+			      int[][MAX_SUBSCRIPTS], loop*, int));
 static int find_gcd PARAMS ((int, int));
-static void merge_dependencies PARAMS ((enum direction_type[][], int[][], int, int));
+static void merge_dependencies PARAMS ((enum direction_type[][MAX_SUBSCRIPTS],
+					int[][MAX_SUBSCRIPTS], int, int));
 static void dump_array_ref PARAMS ((tree));
 static void dump_one_node PARAMS ((def_use*, varray_type*));
 static void dump_node_dependence PARAMS ((void));

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]