Patchwork Fix PR52666

login
register
mail settings
Submitter Richard Guenther
Date March 22, 2012, 1:50 p.m.
Message ID <Pine.LNX.4.64.1203221449150.22008@jbgna.fhfr.qr>
Download mbox | patch
Permalink /patch/148254/
State New
Headers show

Comments

Richard Guenther - March 22, 2012, 1:50 p.m.
Committed as obvious.

Richard.

2012-03-22  Richard Guenther  <rguenther@suse.de>

	PR middle-end/52666
	* fold-const.c (fold_ternary_loc): Fix typo.

Patch

Index: gcc/fold-const.c
===================================================================
--- gcc/fold-const.c	(revision 185691)
+++ gcc/fold-const.c	(working copy)
@@ -14012,7 +14012,7 @@  fold_ternary_loc (location_t loc, enum t
 	  /* Need bit-shifting of the buffer to relax the following.  */
 	  && tree_low_cst (op2, 1) % BITS_PER_UNIT == 0)
 	{
-	  unsigned HOST_WIDE_INT bitpos = tree_low_cst (op1, 2);
+	  unsigned HOST_WIDE_INT bitpos = tree_low_cst (op2, 1);
 	  unsigned HOST_WIDE_INT bitsize = tree_low_cst (op1, 1);
 	  unsigned HOST_WIDE_INT clen;
 	  clen = tree_low_cst (TYPE_SIZE_UNIT (TREE_TYPE (arg0)), 1);