[revert the minor PR45144 missed-optimization fix because it
 results in miscompilation of gnat on m68k with gcc-4.6 and 4.5;
 with gcc-4.7 other changes mask the issue <mikpe@it.uu.se>]

gcc/

2012-02-18  Mikael Pettersson  <mikpe@it.uu.se>

	PR ada/48835

	Revert
	2010-08-05  Jie Zhang  <jie@codesourcery.com>

	PR tree-optimization/45144
	* tree-sra.c (type_consists_of_records_p): Return false
	if the record contains bit-field.

gcc/testsuite/

2012-02-18  Mikael Pettersson  <mikpe@it.uu.se>

	PR ada/48835

	Revert
	2010-09-10  Martin Jambor  <mjambor@suse.cz>

 	PR tree-optimization/44972
	* gcc.dg/tree-ssa/pr45144.c: Adjust scanning expressions.

	Revert
	2010-08-05  Jie Zhang  <jie@codesourcery.com>

	PR tree-optimization/45144
	* gcc.dg/tree-ssa/pr45144.c: New test.

--- gcc-4.6.2/gcc/testsuite/gcc.dg/tree-ssa/pr45144.c.~1~	2010-09-10 01:38:23.000000000 +0200
+++ gcc-4.6.2/gcc/testsuite/gcc.dg/tree-ssa/pr45144.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,46 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-optimized" } */
-
-void baz (unsigned);
-
-extern unsigned buf[];
-
-struct A
-{
-  unsigned a1:10;
-  unsigned a2:3;
-  unsigned:19;
-};
-
-union TMP
-{
-  struct A a;
-  unsigned int b;
-};
-
-static unsigned
-foo (struct A *p)
-{
-  union TMP t;
-  struct A x;
-  
-  x = *p;
-  t.a = x;
-  return t.b;
-}
-
-void
-bar (unsigned orig, unsigned *new)
-{
-  struct A a;
-  union TMP s;
-
-  s.b = orig;
-  a = s.a;
-  if (a.a1)
-    baz (a.a2);
-  *new = foo (&a);
-}
-
-/* { dg-final { scan-tree-dump " = VIEW_CONVERT_EXPR<unsigned int>\\(a\\);" "optimized"} } */
-/* { dg-final { cleanup-tree-dump "optimized" } } */
--- gcc-4.6.2/gcc/tree-sra.c.~1~	2011-10-19 10:45:45.000000000 +0200
+++ gcc-4.6.2/gcc/tree-sra.c	2012-02-18 17:59:25.000000000 +0100
@@ -854,9 +854,6 @@ type_consists_of_records_p (tree type)
       {
 	tree ft = TREE_TYPE (fld);
 
-	if (DECL_BIT_FIELD (fld))
-	  return false;
-
 	if (!is_gimple_reg_type (ft)
 	    && !type_consists_of_records_p (ft))
 	  return false;
