This is the mail archive of the 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]
Other format: [Raw text]

[Patch/ada] Fix thinko in Loop_Statement_to_gnu


this patchlet fixes a thinko in Loop_Statement_to_gnu: size_type_node was used instead of sizetype.

Privately approved by Eric.

Committed on trunk.


2012-02-01  Tristan Gingold  <>

	* gcc-interface/trans.c (Loop_Statement_to_gnu): Use sizetype
	instead of size_type_node.

Index: ada/gcc-interface/trans.c
--- ada/gcc-interface/trans.c	(revision 183790)
+++ ada/gcc-interface/trans.c	(working copy)
@@ -2380,15 +2380,14 @@
 	  /* Otherwise, use the do-while form with the help of a special
 	     induction variable in the unsigned version of the base type
-	     or the unsigned version of the size type, whichever is the
+	     or the unsigned version of sizetype, whichever is the
 	     largest, in order to have wrap-around arithmetics for it.  */
-	      if (TYPE_PRECISION (gnu_base_type)
-		  > TYPE_PRECISION (size_type_node))
+	      if (TYPE_PRECISION (gnu_base_type) > TYPE_PRECISION (sizetype))
 		gnu_base_type = gnat_unsigned_type (gnu_base_type);
-		gnu_base_type = size_type_node;
+		gnu_base_type = sizetype;
 	      gnu_first = convert (gnu_base_type, gnu_first);
 	      gnu_last = convert (gnu_base_type, gnu_last);

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