<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.gcc.patches">
    <title>gmane.comp.gcc.patches</title>
    <link>http://blog.gmane.org/gmane.comp.gcc.patches</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.patches/263881"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.patches/263880"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.patches/263876"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.patches/263875"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.patches/263874"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.patches/263873"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.patches/263868"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.patches/263863"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.patches/263861"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.patches/263857"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.patches/263855"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.patches/263852"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.patches/263850"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.patches/263836"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.patches/263817"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.patches/263814"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.patches/263810"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.patches/263792"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.patches/263790"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.patches/263787"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263881">
    <title>[ARM Patch 1/n] PR53447: optimizations of 64bit ALU operation with constant</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263881</link>
    <description>&lt;pre&gt;Hi,

As described in PR53447, many 64bit ALU operations with constant can be
optimized to use corresponding 32bit instructions with immediate operands.

This is the first part of the patches that deals with 64bit add. It directly
extends the patterns adddi3, arm_adddi3 and adddi3_neon to handle constant
operands.

Tested on arm qemu without regression.

OK for trunk?

thanks
Carrot

2012-05-26  Wei Guozhi  &amp;lt;carrot&amp;lt; at &amp;gt;google.com&amp;gt;

PR target/53447
* gcc.target/arm/pr53447-1.c: New testcase.


2012-05-26  Wei Guozhi  &amp;lt;carrot&amp;lt; at &amp;gt;google.com&amp;gt;

PR target/53447
* config/arm/arm-protos.h (const_ok_for_adddi): New prototype.
* config/arm/arm.c (const_ok_for_adddi): New function.
* config/arm/constraints.md (Dd): New constraint.
* config/arm/arm.md (adddi3): Extend it to handle constants.
(arm_adddi3): Likewise.
* config/arm/neon.md (adddi3_neon): Likewise.


Index: testsuite/gcc.target/arm/pr53447-1.c
===================================================================
--- testsuite/gcc.target/arm/pr53447-1.c(revision 0)
+++ testsuite/gcc.target/arm/pr53447-1.c(revision 0)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* { dg-options "-O2" }  */
+/* { dg-require-effective-target arm32 } */
+/* { dg-final { scan-assembler-not "mov" } } */
+
+void t0p(long long * p)
+{
+  *p += 0x100000001;
+}
Index: config/arm/arm.c
===================================================================
--- config/arm/arm.c(revision 187751)
+++ config/arm/arm.c(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2497,6 +2497,17 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     }
 }

+/* Return TRUE if int I is a valid immediate constant used by pattern
+   arm_adddi3.  */
+int
+const_ok_for_adddi (HOST_WIDE_INT i)
+{
+  HOST_WIDE_INT high = (i &amp;gt;&amp;gt; 32) &amp;amp; 0xFFFFFFFF;
+  HOST_WIDE_INT low = i &amp;amp; 0xFFFFFFFF;
+  return (const_ok_for_arm (high)
+  &amp;amp;&amp;amp; (const_ok_for_arm (low) || const_ok_for_arm (-low)));
+}
+
 /* Emit a sequence of insns to handle a large constant.
    CODE is the code of the operation required, it can be any of SET, PLUS,
    IOR, AND, XOR, MINUS;
Index: config/arm/arm-protos.h
===================================================================
--- config/arm/arm-protos.h(revision 187751)
+++ config/arm/arm-protos.h(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -47,6 +47,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 extern bool arm_small_register_classes_for_mode_p (enum machine_mode);
 extern int arm_hard_regno_mode_ok (unsigned int, enum machine_mode);
 extern bool arm_modes_tieable_p (enum machine_mode, enum machine_mode);
+extern int const_ok_for_adddi (HOST_WIDE_INT);
 extern int const_ok_for_arm (HOST_WIDE_INT);
 extern int const_ok_for_op (HOST_WIDE_INT, enum rtx_code);
 extern int arm_split_constant (RTX_CODE, enum machine_mode, rtx,
Index: config/arm/neon.md
===================================================================
--- config/arm/neon.md(revision 187751)
+++ config/arm/neon.md(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -588,9 +588,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 )

 (define_insn "adddi3_neon"
-  [(set (match_operand:DI 0 "s_register_operand" "=w,?&amp;amp;r,?&amp;amp;r,?w")
-        (plus:DI (match_operand:DI 1 "s_register_operand" "%w,0,0,w")
-                 (match_operand:DI 2 "s_register_operand" "w,r,0,w")))
+  [(set (match_operand:DI 0 "s_register_operand" "=w,?&amp;amp;r,?&amp;amp;r,?w,?&amp;amp;r,?&amp;amp;r,?&amp;amp;r")
+        (plus:DI (match_operand:DI 1 "s_register_operand" "%w,0,0,w,r,0,r")
+                 (match_operand:DI 2 "reg_or_int_operand" "w,r,0,w,r,Dd,Dd")))
    (clobber (reg:CC CC_REGNUM))]
   "TARGET_NEON"
 {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -600,13 +600,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     case 3: return "vadd.i64\t%P0, %P1, %P2";
     case 1: return "#";
     case 2: return "#";
+    case 4: return "#";
+    case 5: return "#";
+    case 6: return "#";
     default: gcc_unreachable ();
     }
 }
-  [(set_attr "neon_type" "neon_int_1,*,*,neon_int_1")
-   (set_attr "conds" "*,clob,clob,*")
-   (set_attr "length" "*,8,8,*")
-   (set_attr "arch" "nota8,*,*,onlya8")]
+  [(set_attr "neon_type" "neon_int_1,*,*,neon_int_1,*,*,*")
+   (set_attr "conds" "*,clob,clob,*,clob,clob,clob")
+   (set_attr "length" "*,8,8,*,*,*,*")
+   (set_attr "arch" "nota8,*,*,onlya8,*,*,*")]
 )

 (define_insn "*sub&amp;lt;mode&amp;gt;3_neon"
Index: config/arm/constraints.md
===================================================================
--- config/arm/constraints.md(revision 187751)
+++ config/arm/constraints.md(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -29,7 +29,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 ;; in Thumb-1 state: I, J, K, L, M, N, O

 ;; The following multi-letter normal constraints have been used:
-;; in ARM/Thumb-2 state: Da, Db, Dc, Dn, Dl, DL, Dv, Dy, Di, Dt, Dz
+;; in ARM/Thumb-2 state: Da, Db, Dc, Dd, Dn, Dl, DL, Dv, Dy, Di, Dt, Dz
 ;; in Thumb-1 state: Pa, Pb, Pc, Pd, Pe
 ;; in Thumb-2 state: Pj, PJ, Ps, Pt, Pu, Pv, Pw, Px, Py

&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -251,6 +251,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
       (match_test "TARGET_32BIT &amp;amp;&amp;amp; arm_const_double_inline_cost (op) == 4
    &amp;amp;&amp;amp; !(optimize_size || arm_ld_sched)")))

+(define_constraint "Dd"
+ "&amp;lt; at &amp;gt;internal
+ In ARM/Thumb-2 state a const_int that can be used by insn adddi."
+ (and (match_code "const_int")
+      (match_test "TARGET_32BIT &amp;amp;&amp;amp; const_ok_for_adddi (ival)")))
+
 (define_constraint "Di"
  "&amp;lt; at &amp;gt;internal
   In ARM/Thumb-2 state a const_int or const_double where both the high
Index: config/arm/arm.md
===================================================================
--- config/arm/arm.md(revision 187751)
+++ config/arm/arm.md(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -574,10 +574,21 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
  [(parallel
    [(set (match_operand:DI           0 "s_register_operand" "")
   (plus:DI (match_operand:DI 1 "s_register_operand" "")
-           (match_operand:DI 2 "s_register_operand" "")))
+           (match_operand:DI 2 "reg_or_int_operand" "")))
     (clobber (reg:CC CC_REGNUM))])]
   "TARGET_EITHER"
   "
+  if (GET_CODE (operands[2]) == CONST_INT)
+    {
+      if (TARGET_32BIT &amp;amp;&amp;amp; const_ok_for_adddi (INTVAL (operands[2])))
+{
+  emit_insn (gen_arm_adddi3 (operands[0], operands[1], operands[2]));
+  DONE;
+}
+      else
+operands[2] = force_reg (DImode, operands[2]);
+    }
+
   if (TARGET_HARD_FLOAT &amp;amp;&amp;amp; TARGET_MAVERICK)
     {
       if (!cirrus_fp_register (operands[0], DImode))
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -609,10 +620,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
   [(set_attr "length" "4")]
 )

-(define_insn_and_split "*arm_adddi3"
-  [(set (match_operand:DI          0 "s_register_operand" "=&amp;amp;r,&amp;amp;r")
-(plus:DI (match_operand:DI 1 "s_register_operand" "%0, 0")
- (match_operand:DI 2 "s_register_operand" "r,  0")))
+(define_insn_and_split "arm_adddi3"
+  [(set (match_operand:DI          0 "s_register_operand" "=&amp;amp;r,&amp;amp;r,&amp;amp;r,&amp;amp;r,&amp;amp;r")
+(plus:DI (match_operand:DI 1 "s_register_operand" "%0, 0, r, 0, r")
+ (match_operand:DI 2 "reg_or_int_operand" "r,  0, r, Dd,Dd")))
    (clobber (reg:CC CC_REGNUM))]
   "TARGET_32BIT &amp;amp;&amp;amp; !(TARGET_HARD_FLOAT &amp;amp;&amp;amp; TARGET_MAVERICK) &amp;amp;&amp;amp; !TARGET_NEON"
   "#"
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -630,8 +641,17 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     operands[0] = gen_lowpart (SImode, operands[0]);
     operands[4] = gen_highpart (SImode, operands[1]);
     operands[1] = gen_lowpart (SImode, operands[1]);
-    operands[5] = gen_highpart (SImode, operands[2]);
-    operands[2] = gen_lowpart (SImode, operands[2]);
+    if (GET_CODE (operands[2]) == CONST_INT)
+      {
+HOST_WIDE_INT v = INTVAL (operands[2]);
+operands[5] = GEN_INT (ARM_SIGN_EXTEND ((v &amp;gt;&amp;gt; 32) &amp;amp; 0xFFFFFFFF));
+operands[2] = GEN_INT (ARM_SIGN_EXTEND (v &amp;amp; 0xFFFFFFFF));
+      }
+    else
+      {
+operands[5] = gen_highpart (SImode, operands[2]);
+operands[2] = gen_lowpart (SImode, operands[2]);
+      }
   }"
   [(set_attr "conds" "clob")
    (set_attr "length" "8")]

&lt;/pre&gt;</description>
    <dc:creator>Carrot Wei</dc:creator>
    <dc:date>2012-05-26T13:42:52</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263880">
    <title>[C++ Patch] PR 25137</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263880</link>
    <description>&lt;pre&gt;Hi,

I found the time to return to this issue, where -Wmissing-braces is 
often overeager to warn, thus annoying, for example, people using -Wall 
together with std::array:

     std::array&amp;lt;int, 3&amp;gt; s = { 1, 2, 3 };

I handle the issue following the letter of the suggestion given by Ian 
at the time: do not warn when the class type has only one field and that 
field is an aggregate (recursively, of course). Indeed, that seems to me 
quite conservative. I also make sure to change nothing wrt the 
designated initializers extension.

Bootstrapped and tested x86_64-linux.

Thanks,
Paolo.

////////////////////////
/cp
2012-05-26  Paolo Carlini  &amp;lt;paolo.carlini&amp;lt; at &amp;gt;oracle.com&amp;gt;

PR c++/25137
* decl.c (reshape_init_r): Add bool parameter.
(reshape_init_class): If the struct has only one field and that
field is an aggregate, don't warn if there is only one set of
braces in the initializer.
(reshape_init_array_1, reshape_init_class, reshape_init): Adjust.

/testsuite
2012-05-26  Paolo Carlini  &amp;lt;paolo.carlini&amp;lt; at &amp;gt;oracle.com&amp;gt;

PR c++/25137
* g++.dg/warn/Wbraces3.C: New.

Index: testsuite/g++.dg/warn/Wbraces3.C
===================================================================
--- testsuite/g++.dg/warn/Wbraces3.C(revision 0)
+++ testsuite/g++.dg/warn/Wbraces3.C(revision 0)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,34 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+// PR c++/25137
+// { dg-options "-Wmissing-braces" }
+
+struct S { int s[3]; };
+S s1 = { 1, 1, 1 };
+
+struct S1 { int s[3]; };
+struct S2 { struct S1 a; };
+S2 s21 = { 1, 1, 1 }; 
+
+struct S3 { int s[3]; };
+struct S4 { struct S3 a; int b; };
+S4 s41 = { 1, 1, 1, 1 };   // { dg-warning "missing braces around initializer for 'S3'" }
+
+struct S5 { int s[3]; };
+struct S6 { struct S5 a; int b; };
+S6 s61 = { { 1, 1, 1 }, 1 };
+
+struct S7 { int s[3]; };
+struct S8 { int a; struct S7 b; };
+S8 s81 = { 1, { 1, 1, 1 } };
+
+struct S9 { int s[2]; };
+struct S10 { struct S9 a; struct S9 b; };
+S10 s101 = { { 1, 1 }, 1, 1 }; // { dg-warning "missing braces around initializer for 'S9'" }
+
+struct S11 { int s[2]; };
+struct S12 { struct S11 a; struct S11 b; };
+S12 s121 = { { 1, 1 }, { 1, 1 } };
+
+struct S13 { int i; };
+struct S14 { struct S13 a; };
+struct S15 { struct S14 b; };
+S15 s151 = { 1 };
Index: cp/decl.c
===================================================================
--- cp/decl.c(revision 187907)
+++ cp/decl.c(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4954,7 +4954,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; typedef struct reshape_iterator_t
   constructor_elt *end;
 } reshape_iter;
 
-static tree reshape_init_r (tree, reshape_iter *, bool, tsubst_flags_t);
+static tree reshape_init_r (tree, reshape_iter *, bool, bool, tsubst_flags_t);
 
 /* FIELD is a FIELD_DECL or NULL.  In the former case, the value
    returned is the next FIELD_DECL (possibly FIELD itself) that can be
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -5014,7 +5014,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; reshape_init_array_1 (tree elt_type, tree max_inde
 
       check_array_designated_initializer (d-&amp;gt;cur, index);
       elt_init = reshape_init_r (elt_type, d, /*first_initializer_p=*/false,
- complain);
+ /*no_warn_missing_braces=*/false, complain);
       if (elt_init == error_mark_node)
 return error_mark_node;
       CONSTRUCTOR_APPEND_ELT (CONSTRUCTOR_ELTS (new_init),
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -5082,6 +5082,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; reshape_init_class (tree type, reshape_iter *d, bo
 {
   tree field;
   tree new_init;
+  bool no_warn_missing_braces;
 
   gcc_assert (CLASS_TYPE_P (type));
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -5105,6 +5106,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; reshape_init_class (tree type, reshape_iter *d, bo
       return new_init;
     }
 
+  /* If the struct has only one field and that field is an aggregate,
+     don't warn if there is only one set of braces in the initializer.  */
+  no_warn_missing_braces
+    = (next_initializable_field (DECL_CHAIN (field)) == NULL_TREE
+       &amp;amp;&amp;amp; CP_AGGREGATE_TYPE_P (TREE_TYPE (field)));
+
   /* Loop through the initializable fields, gathering initializers.  */
   while (d-&amp;gt;cur != d-&amp;gt;end)
     {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -5125,7 +5132,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; reshape_init_class (tree type, reshape_iter *d, bo
     /* We already reshaped this.  */
     gcc_assert (d-&amp;gt;cur-&amp;gt;index == field);
   else
-    field = lookup_field_1 (type, d-&amp;gt;cur-&amp;gt;index, /*want_type=*/false);
+    {
+      field = lookup_field_1 (type, d-&amp;gt;cur-&amp;gt;index, /*want_type=*/false);
+      no_warn_missing_braces = false;
+    }
 
   if (!field || TREE_CODE (field) != FIELD_DECL)
     {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -5141,7 +5151,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; reshape_init_class (tree type, reshape_iter *d, bo
 break;
 
       field_init = reshape_init_r (TREE_TYPE (field), d,
-   /*first_initializer_p=*/false, complain);
+   /*first_initializer_p=*/false,
+   no_warn_missing_braces, complain);
       if (field_init == error_mark_node)
 return error_mark_node;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -5183,11 +5194,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; has_designator_problem (reshape_iter *d, tsubst_fl
    a CONSTRUCTOR). TYPE is the type of the variable being initialized, D is the
    iterator within the CONSTRUCTOR which points to the initializer to process.
    FIRST_INITIALIZER_P is true if this is the first initializer of the
-   outermost CONSTRUCTOR node.  */
+   outermost CONSTRUCTOR node.  If NO_WARN_MISSING_BRACES is true don't warn
+   about missing braces around initializer.  */
 
 static tree
 reshape_init_r (tree type, reshape_iter *d, bool first_initializer_p,
-tsubst_flags_t complain)
+bool no_warn_missing_braces, tsubst_flags_t complain)
 {
   tree init = d-&amp;gt;cur-&amp;gt;value;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -5335,8 +5347,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; reshape_init_r (tree type, reshape_iter *d, bool f
     }
 }
 
-      warning (OPT_Wmissing_braces, "missing braces around initializer for %qT",
-       type);
+      if (!no_warn_missing_braces)
+warning (OPT_Wmissing_braces,
+ "missing braces around initializer for %qT", type);
     }
 
   /* Dispatch to specialized routines.  */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -5385,7 +5398,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; reshape_init (tree type, tree init, tsubst_flags_t
   d.cur = VEC_index (constructor_elt, v, 0);
   d.end = d.cur + VEC_length (constructor_elt, v);
 
-  new_init = reshape_init_r (type, &amp;amp;d, true, complain);
+  new_init = reshape_init_r (type, &amp;amp;d, true, /*no_warn_missing_braces=*/false,
+     complain);
   if (new_init == error_mark_node)
     return error_mark_node;
 
&lt;/pre&gt;</description>
    <dc:creator>Paolo Carlini</dc:creator>
    <dc:date>2012-05-26T13:30:48</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263876">
    <title>[Ada] Fix gnat.dg/return3.adb regression</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263876</link>
    <description>&lt;pre&gt;The problem is that the new call to cleanup_cfg in gimple_expand_cfg has 
short-circuited the machinery that emits nops to carry goto locus at -O0.
The machinery works in CFGLAYOUT mode, but here we're still in CFGRTL.

The attached patch makes it so that forwarder blocks are not deleted by 
try_optimize_cfg if CLEANUP_NO_INSN_DEL and partially extends the above 
machinery to the CFGRTL mode.

Bootstrapped/regtested on x86_64-suse-linux, applied on the mainline.


2012-05-26  Eric Botcazou  &amp;lt;ebotcazou&amp;lt; at &amp;gt;adacore.com&amp;gt;

* cfgcleanup.c (try_optimize_cfg): Do not delete forwarder blocks
if CLEANUP_NO_INSN_DEL.
* cfgrtl.c (unique_locus_on_edge_between_p): New function extracted
from cfg_layout_merge_blocks.
(emit_nop_for_unique_locus_between): New function.
(rtl_merge_blocks): Invoke emit_nop_for_unique_locus_between.
(cfg_layout_merge_blocks): Likewise.


&lt;/pre&gt;</description>
    <dc:creator>Eric Botcazou</dc:creator>
    <dc:date>2012-05-26T12:00:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263875">
    <title>Fix gnat.dg/renaming5.adb regression</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263875</link>
    <description>&lt;pre&gt;There is one more goto in the .optimized dump because the latch of a loop is 
now preserved.

Tested on i586-suse-linux, applied on the mainline.


2012-05-26  Eric Botcazou  &amp;lt;ebotcazou&amp;lt; at &amp;gt;adacore.com&amp;gt;

* gnat.dg/renaming5.adb: Adjust dg-final directive.


&lt;/pre&gt;</description>
    <dc:creator>Eric Botcazou</dc:creator>
    <dc:date>2012-05-26T11:43:36</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263874">
    <title>[Ada] Small tweak to type derivation machinery</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263874</link>
    <description>&lt;pre&gt;To have the name of the types of the variant part and the fields therein be 
unique instead of mere duplicates of those of the base type, which makes it 
easier to debug type merging issues in LTO mode.

Tested on i586-suse-linux, applied on the mainline, 4.7 and 4.6 branches.


2012-05-26  Eric Botcazou  &amp;lt;ebotcazou&amp;lt; at &amp;gt;adacore.com&amp;gt;

* gcc-interface/decl.c (variant_desc): Rename 'record' to 'new_type'.
(build_variant_list): Adjust to above renaming.
(gnat_to_gnu_entity) &amp;lt;E_Record_Subtype&amp;gt;: Likewise.  Give a unique name
to the type of the variant containers.
(create_variant_part_from): Likewise.  Give a unique name to the type
of the variant part.


&lt;/pre&gt;</description>
    <dc:creator>Eric Botcazou</dc:creator>
    <dc:date>2012-05-26T10:38:49</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263873">
    <title>[Patch ARM] Fix off by one error in neon_evpc_vrev.</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263873</link>
    <description>&lt;pre&gt;Hi,

       There is  an off by one error in neon_evpc_vrev which means it
rarely gets triggerred. The problem is that if you are looking at
d-&amp;gt;perm [i +j]  and you increment i by just diff you end up starting
looking where you looked at the end of the last place where you
checked. Given this I think this patch should make it to trunk and to
the 4.7 branch after appropriate testing and if the release managers
don't object to such a change. The point is that this helps generate
proper vect_reverse style instructions for arm_neon. There is scope
for a follow up patch that fixes up the intrinsics essentially
identical to all the functions in the test that I've added (except for
a couple of missing v2sf and v4sf type operations which should boil
down to the same implementation) . It's a permute so the type really
doesn't matter. However it requires some ML magic with permutations
for the masks which will prove to be good fun on a plane trip.

Testing currently in progress and if there are no regressions I intend
to commit this to trunk and (after a while I would like to backport
this to the 4.7 branch if there are no objections from the release
managers)

 RichardH , since you did the original patch would you mind having a
quick look to see if I haven't missed anything obvious.



* config/arm/arm.c (arm_evpc_neon_vrev): Fix off by one
error.
* gcc.target/arm/neon-vrev.c: New.


regards,
Ramana



1. For one example from the testcase you can see the effects before
and after for this :  (left is new compiler and right is old compiler)



vrev16q2_u8:vrev16q2_u8:
&amp;lt; at &amp;gt; args = 0, pretend = 0, frame = 0&amp;lt; at &amp;gt; args = 0, pretend = 0, frame = 0
&amp;lt; at &amp;gt; frame_needed = 0, uses_anonymous_args = 0&amp;lt; at &amp;gt; frame_needed = 0,
uses_anonymous_args = 0
&amp;lt; at &amp;gt; link register save eliminated.&amp;lt; at &amp;gt; link register save eliminated.
vmovd16, r0, r1  &amp;lt; at &amp;gt; v16qi      |vmovd20, r0, r1  &amp;lt; at &amp;gt; v16qi
vmovd17, r2, r3      |vmovd21, r2, r3
vrev16.8q8, q8      |vldrd16, .L41
vmovr0, r1, d16  &amp;lt; at &amp;gt; v16qi      |vldrd17, .L41+8
vmovr2, r3, d17      |vtbl.8d18, {d20, d21}, d16
bxlr      |vtbl.8d19, {d20, d21}, d17
      &amp;gt;vmovr0, r1, d18  &amp;lt; at &amp;gt; v16qi
      &amp;gt;vmovr2, r3, d19
      &amp;gt;bxlr
      &amp;gt;.L42:
      &amp;gt;.align3
      &amp;gt;.L41:
      &amp;gt;.byte1
      &amp;gt;.byte0
      &amp;gt;.byte3
      &amp;gt;.byte2
      &amp;gt;.byte5
      &amp;gt;.byte4
      &amp;gt;.byte7
      &amp;gt;.byte6
      &amp;gt;.byte9
      &amp;gt;.byte8
      &amp;gt;.byte11
      &amp;gt;.byte10
      &amp;gt;.byte13
      &amp;gt;.byte12
      &amp;gt;.byte15
      &amp;gt;.byte14
.sizevrev16q2_u8, .-vrev16q2_u8.sizevrev16q2_u8, .-vrev16q2_u8
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 321e6b5..bcad0b9 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -25668,10 +25668,18 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; arm_evpc_neon_vrev (struct expand_vec_perm_d *d)
       return false;
     }
 
-  for (i = 0; i &amp;lt; nelt; i += diff)
+  for (i = 0; i &amp;lt; nelt ; i += (diff + 1))
     for (j = 0; j &amp;lt;= diff; j += 1)
-      if (d-&amp;gt;perm[i + j] != i + diff - j)
-return false;
+      {
+/* This is guaranteed to be true as the value of diff
+   is 7, 3, 1 and we should have enough elements in the
+   queue to generate this. Getting a vector mask with a
+   value of diff other than these values implies that
+   something is wrong by the time we get here.  */
+gcc_assert ((i + j) &amp;lt; nelt);
+if (d-&amp;gt;perm[i + j] != i + diff - j)
+  return false;
+      }
 
   /* Success! */
   if (d-&amp;gt;testing_p)
--- /dev/null2012-05-25 12:51:24.801630363 +0100
+++ gcc/testsuite/gcc.target/arm/neon-vrev.c2012-05-26 03:18:02.095635775 +0100
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,105 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include &amp;lt;arm_neon.h&amp;gt;
+
+uint16x4_t
+tst_vrev642_u16 (uint16x4_t __a)
+{
+  uint16x4_t __rv;
+  uint16x4_t __mask1 = { 3, 2, 1, 0};
+  return __builtin_shuffle ( __a, __mask1) ;
+}
+
+uint16x8_t
+tst_vrev64q2_u16 (uint16x8_t __a)
+{
+  uint16x8_t __rv;
+  uint16x8_t __mask1 = {3, 2, 1, 0, 7, 6, 5, 4 };
+  return __builtin_shuffle ( __a, __mask1) ;
+}
+
+uint8x8_t
+tst_vrev642_u8 (uint8x8_t __a)
+{
+  uint8x8_t __rv;
+  uint8x8_t __mask1 = { 7, 6, 5, 4, 3, 2, 1, 0};
+  return __builtin_shuffle ( __a, __mask1) ;
+}
+
+uint8x16_t
+tst_vrev64q2_u8 (uint8x16_t __a)
+{
+  uint8x16_t __rv;
+  uint8x16_t __mask1 = {7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8};
+  return __builtin_shuffle ( __a, __mask1) ;
+
+}
+
+uint32x2_t
+tst_vrev642_u32 (uint32x2_t __a)
+{
+  uint32x2_t __rv;
+  uint32x2_t __mask1 = {1, 0};
+  return __builtin_shuffle ( __a, __mask1) ;
+
+}
+
+uint32x4_t
+tst_vrev64q2_u32 (uint32x4_t __a)
+{
+  uint32x4_t __rv;
+  uint32x4_t __mask1 = {1, 0, 3, 2};
+  return __builtin_shuffle ( __a, __mask1) ;
+}
+
+uint16x4_t
+tst_vrev322_u16 (uint16x4_t __a)
+{
+  uint16x4_t __mask1 = { 1, 0, 3, 2 };
+  return __builtin_shuffle (__a, __mask1);
+}
+
+uint16x8_t
+tst_vrev32q2_u16 (uint16x8_t __a)
+{
+  uint16x8_t __mask1 = { 1, 0, 3, 2, 5, 4, 7, 6 }; 
+  return __builtin_shuffle (__a, __mask1);
+}
+
+uint8x8_t
+tst_vrev322_u8 (uint8x8_t __a)
+{
+  uint8x8_t __mask1 = { 3, 2, 1, 0, 7, 6, 5, 4};
+  return __builtin_shuffle (__a, __mask1);
+}
+
+uint8x16_t
+tst_vrev32q2_u8 (uint8x16_t __a)
+{
+  uint8x16_t __mask1 = { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12};
+  return __builtin_shuffle (__a, __mask1);
+}
+
+uint8x8_t
+tst_vrev162_u8 (uint8x8_t __a)
+{
+  uint8x8_t __mask = { 1, 0, 3, 2, 5, 4, 7, 6};
+  return __builtin_shuffle (__a, __mask);
+}
+
+uint8x16_t
+tst_vrev16q2_u8 (uint8x16_t __a)
+{
+  uint8x16_t __mask = { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14};
+  return __builtin_shuffle (__a, __mask);
+}
+
+/* { dg-final {scan-assembler-times "vrev32\.16\\t" 2} }  */
+/* { dg-final {scan-assembler-times "vrev32\.8\\t" 2} }  */ 
+/* { dg-final {scan-assembler-times "vrev16\.8\\t" 2} }  */
+/* { dg-final {scan-assembler-times "vrev64\.8\\t" 2} }  */
+/* { dg-final {scan-assembler-times "vrev64\.32\\t" 2} }  */
+/* { dg-final {scan-assembler-times "vrev64\.16\\t" 2} }  */
&lt;/pre&gt;</description>
    <dc:creator>Ramana Radhakrishnan</dc:creator>
    <dc:date>2012-05-26T08:27:53</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263868">
    <title>[C++ Patch] PR 53491</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263868</link>
    <description>&lt;pre&gt;Hi,

an ICE on invalid, regression in 4.7 and 4.8. In 4.7 (vs 4.6) we started 
using stabilize_expr in one more place in cp_build_modify_expr without 
also adding a preliminary check that the expr isn't of void type, thus 
we can easily end up calling build_type_target_expr_with_type on it and 
crash.

The fix I tested could be even simpler but I guess we want to also emit 
the error line " in evaluation of...", like in 4.6. If you can't imagine 
how we could regress with this sort of fix (I can't ;) probably the 
issue should be also addressed in 4.7, this kind of invalid code must be 
quite common.

Thanks,
Paolo.

/////////////////////////
/cp
2012-05-26  Paolo Carlini  &amp;lt;paolo.carlini&amp;lt; at &amp;gt;oracle.com&amp;gt;

PR c++/53491
* typeck.c (cp_build_modify_expr): Fo binary ops, check that the
right-hand side isn't of void type.

/testsuite
2012-05-26  Paolo Carlini  &amp;lt;paolo.carlini&amp;lt; at &amp;gt;oracle.com&amp;gt;

PR c++/53491
* g++.dg/parse/crash60.C: New.

Index: testsuite/g++.dg/parse/crash60.C
===================================================================
--- testsuite/g++.dg/parse/crash60.C(revision 0)
+++ testsuite/g++.dg/parse/crash60.C(revision 0)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+// PR c++/53491
+
+struct M
+{
+  void pop();
+};
+
+void foo()
+{
+  int result = 0;
+  M m;
+
+  result += m.pop();  // { dg-error "not ignored|in evaluation" }
+}
Index: cp/typeck.c
===================================================================
--- cp/typeck.c(revision 187901)
+++ cp/typeck.c(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -6949,10 +6949,20 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; cp_build_modify_expr (tree lhs, enum tree_code mod
   lhs = stabilize_reference (lhs);
   if (TREE_SIDE_EFFECTS (rhs))
     rhs = mark_rvalue_use (rhs);
-  rhs = stabilize_expr (rhs, &amp;amp;init);
-  newrhs = cp_build_binary_op (input_location,
-       modifycode, lhs, rhs,
-       complain);
+
+  if (VOID_TYPE_P (TREE_TYPE (rhs)))
+    {
+      if (complain &amp;amp; tf_error)
+error ("void value not ignored as it ought to be");
+      newrhs = error_mark_node;
+    }
+  else
+    {
+      rhs = stabilize_expr (rhs, &amp;amp;init);
+      newrhs = cp_build_binary_op (input_location,
+   modifycode, lhs, rhs,
+   complain);
+    }
   if (newrhs == error_mark_node)
     {
       if (complain &amp;amp; tf_error)
&lt;/pre&gt;</description>
    <dc:creator>Paolo Carlini</dc:creator>
    <dc:date>2012-05-26T01:11:52</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263863">
    <title>[patch] Fixes to make check_makefile_deps.sh work again</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263863</link>
    <description>&lt;pre&gt;Hello,

The following patch was necessary to make check_makefile_deps.sh work
on powerpc64-unknown-linux-gnu. Is this OK?

Ciao!
Steven

Index: contrib/ChangeLog
===================================================================
--- contrib/ChangeLog(revision 187901)
+++ contrib/ChangeLog(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,3 +1,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+2012-05-25  Steven Bosscher  &amp;lt;steven at gcc dot gnu dot org&amp;gt;
+
+* check_makefile_deps.sh: Add ecrti.o and ecrtn.o to the list of
+objects to skip unconditionaly.  Check for c-common.o in c-family/.
+
 2012-05-25  H.J. Lu  &amp;lt;hongjiu dot lu at intel dot com&amp;gt;

 PR bootstrap/53472
Index: contrib/check_makefile_deps.sh
===================================================================
--- contrib/check_makefile_deps.sh(revision 187901)
+++ contrib/check_makefile_deps.sh(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -19,7 +19,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;

 # Skip some objects unconditionally; make sure each name in this list is
 # surrounded by spaces.
-skip=" crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o
crtfastmath.o crtprec64.o crtprec80.o crtprec32.o "
+skip=" crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o
crtfastmath.o crtprec64.o crtprec80.o crtprec32.o ecrti.o ecrtn.o "

 # Files which show up as dependencies other than through
unconditional #include.
 # This is an egrep pattern.
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -34,7 +34,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 set -e
 st=0

-if test -f c-common.o; then :; else
+if test -f c-family/c-common.o; then :; else
   echo "$0: rerun in an up to date build-tree/gcc directory" &amp;gt;&amp;amp;2
   exit 1
 fi

&lt;/pre&gt;</description>
    <dc:creator>Steven Bosscher</dc:creator>
    <dc:date>2012-05-25T23:38:10</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263861">
    <title>Merge from gcc-4_7-branch to gccgo branch</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263861</link>
    <description>&lt;pre&gt;I've merged gcc-4_7-branch revision 187900 to the gccgo branch.

Ian

&lt;/pre&gt;</description>
    <dc:creator>Ian Lance Taylor</dc:creator>
    <dc:date>2012-05-25T22:45:03</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263857">
    <title>[google/gcc-4_6] Fix -gfission ICEs with pubnames and .debug_addr table (issue6254054)</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263857</link>
    <description>&lt;pre&gt;This patch is for the google/gcc-4_6 branch.

It fixes a problem where we were still trying to output entries
in the .debug_addr table for location lists that were removed,
and fixes a problem where we were getting an ICE while trying
to output a pubname for a member function of a struct.

Tested with the GCC testsuite and validate-failures.py, and
also with an internal Google build with -gfission enabled.


2012-05-25   Sterling Augustine  &amp;lt;saugustine&amp;lt; at &amp;gt;google.com&amp;gt;
     Cary Coutant  &amp;lt;ccoutant&amp;lt; at &amp;gt;google.com&amp;gt;

* gcc/dwarf2out.c (remove_loc_list_addr_table_entries): New function.
(is_class_die): Return TRUE for DW_TAG_structure_type.
(resolve_addr): Remove address table entries when replacing a
location list.


Index: gcc/dwarf2out.c
===================================================================
--- gcc/dwarf2out.c(revision 187887)
+++ gcc/dwarf2out.c(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -7864,6 +7864,19 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; remove_addr_table_entry (unsigned int i)
   attr-&amp;gt;dw_attr = (enum dwarf_attribute) 0;
 }
 
+/* Given a location list, remove all addresses it refers to from the
+   address_table.  */
+
+static void
+remove_loc_list_addr_table_entries (dw_loc_list_ref loc)
+{
+  dw_loc_descr_ref descr;
+
+  for (descr = loc-&amp;gt;expr; descr; descr = descr-&amp;gt;dw_loc_next)
+    if (descr-&amp;gt;dw_loc_oprnd1.val_index != -1U)
+      remove_addr_table_entry (descr-&amp;gt;dw_loc_oprnd1.val_index);
+}
+
 /* Add an address constant attribute value to a DIE.  */
 
 static inline void
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -10033,7 +10046,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; is_namespace_die (dw_die_ref c)
 static inline bool
 is_class_die (dw_die_ref c)
 {
-  return c &amp;amp;&amp;amp; c-&amp;gt;die_tag == DW_TAG_class_type;
+  return c &amp;amp;&amp;amp; (c-&amp;gt;die_tag == DW_TAG_class_type
+       || c-&amp;gt;die_tag == DW_TAG_structure_type);
 }
 
 static char *
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -23788,15 +23802,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; resolve_addr (dw_die_ref die)
 if (!resolve_addr_in_expr ((*curr)-&amp;gt;expr))
   {
     dw_loc_list_ref next = (*curr)-&amp;gt;dw_loc_next;
-    dw_loc_descr_ref l = (*curr)-&amp;gt;expr;
 
     if (next &amp;amp;&amp;amp; (*curr)-&amp;gt;ll_symbol)
       {
 gcc_assert (!next-&amp;gt;ll_symbol);
 next-&amp;gt;ll_symbol = (*curr)-&amp;gt;ll_symbol;
       }
-    if (l-&amp;gt;dw_loc_oprnd1.val_index != -1U)
-      remove_addr_table_entry (l-&amp;gt;dw_loc_oprnd1.val_index);
+    remove_loc_list_addr_table_entries (*curr);
     *curr = next;
   }
 else

--
This patch is available for review at http://codereview.appspot.com/6254054

&lt;/pre&gt;</description>
    <dc:creator>Cary Coutant</dc:creator>
    <dc:date>2012-05-25T22:29:27</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263855">
    <title>libgo patch committed: More efficient trampoline allocation</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263855</link>
    <description>&lt;pre&gt;This patch to libgo makes the implementation of function trampolines,
used for nested functions that refer to variables in an enclosing
function scope, much more efficient.  Previously we were allocating a
separate page for each trampoline.  This patch packs them on a single
page as much as possible.  Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu.  Commited to mainline and 4.7 branch.

Ian

&lt;/pre&gt;</description>
    <dc:creator>Ian Lance Taylor</dc:creator>
    <dc:date>2012-05-25T21:51:47</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263852">
    <title>Go patch committed: Don't create a closure if not needed</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263852</link>
    <description>&lt;pre&gt;This patch to the Go frontend changes it to not produce a closure for an
embedded function if one is not needed.  Earlier, when Go permitted
comparisons of function types, it was necessary to always create a
closure for an embedded function, so that each embedded function would
be reliably distinct.  Go 1 removed function comparisons, for this and
other reasons.  Now, if an embedded function does not require a closure,
because it does not refer to any variables defined in enclosing
functions, we don't need to create a closure.  Bootstrapped and ran Go
testsuite on x86_64-unknown-linux-gnu.  Committed to mainline and 4.7
branch.

Ian

&lt;/pre&gt;</description>
    <dc:creator>Ian Lance Taylor</dc:creator>
    <dc:date>2012-05-25T21:14:51</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263850">
    <title>libgcc patch committed: Fix for -fsplit-stack when using gold</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263850</link>
    <description>&lt;pre&gt;When using the gold linker, the linker will adjust the split-stack
prologue to call __morestack_non_split if it sees that the function
calls a different function compiled without -fsplit-stack.  The
__morestack_non_split function has an optimization I committed
2011-12-20 to avoid splitting the stack if it has a lot of space.
Unfortunately, I forgot that if the function calling
__morestack_non_split is a varargs function, then it expects %ebp to
have a particular value when __morestack_non_split returns.  There is no
reasonable way for __morestack_non_split to set %ebp to the right value
without actually splitting the stack.  This patch changes
__morestack_non_split to do a stack split when called by a varargs
function.  It detects a call from a varargs function by looking at the
instruction it is going to return to, to see if it uses %ebp.

Bootstrapped and ran Go testsuite and split-stack tests on
x86_64-unknown-linux-gnu, both 32-bit and 64-bit.  Added a new test to
check this case in the future.  With an unpatched libgcc, the test will
succeed with GNU ld, fail with gold.

Committed to mainline and 4.7 branch.

Ian


libgcc/:

2012-05-25  Ian Lance Taylor  &amp;lt;iant&amp;lt; at &amp;gt;google.com&amp;gt;

* config/i386/morestack.S (__morestack_non_split): Check whether
caller is varargs and needs %bp to hold the stack frame on return.

gcc/testsuite/:

2012-05-25  Ian Lance Taylor  &amp;lt;iant&amp;lt; at &amp;gt;google.com&amp;gt;

* gcc.dg/split-6.c: New test.


&lt;/pre&gt;</description>
    <dc:creator>Ian Lance Taylor</dc:creator>
    <dc:date>2012-05-25T20:50:00</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263836">
    <title>libgo patch committed: Fix cast error</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263836</link>
    <description>&lt;pre&gt;This patch to libgo fixes a cast error in the new file print.c that
shows up on 32-bit systems.  Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline and 4.7 branch.

Ian

&lt;/pre&gt;</description>
    <dc:creator>Ian Lance Taylor</dc:creator>
    <dc:date>2012-05-25T18:22:44</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263817">
    <title>[PATCH, i386]: Fix PR 53474, Solaris/x86 bootstrap with Sun as broken: j.e</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263817</link>
    <description>&lt;pre&gt;Hello!

2012-05-25  Uros Bizjak  &amp;lt;ubizjak&amp;lt; at &amp;gt;gmail.com&amp;gt;

PR target/53474
* config/i386/i386.c (ix86_print_operand) &amp;lt;case 'O'&amp;gt;: Print '.' here.
&amp;lt;case 'C', case 'c', case 'F', case 'f'&amp;gt;: Print '.' only for C and c.

Tested on i386-pc-solaris2.10 by Rainer, and on x86_64-pc-linux-gnu
{,-m32}. Committed to mainline SVN.

Uros.
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c(revision 187882)
+++ config/i386/i386.c(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -13931,8 +13931,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
    C -- print opcode suffix for set/cmov insn.
    c -- like C, but print reversed condition
    F,f -- likewise, but for floating-point.
-   O -- if HAVE_AS_IX86_CMOV_SUN_SYNTAX, print the opcode suffix for
-the size of the current operand, otherwise nothing.
+   O -- if HAVE_AS_IX86_CMOV_SUN_SYNTAX, expand to "w.", "l." or "q.",
+otherwise nothing
    R -- print the prefix for register names.
    z -- print the opcode suffix for the size of the current operand.
    Z -- likewise, with special suffixes for x87 instructions.
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -14061,6 +14061,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 ("invalid operand size for operand code 'O'");
       return;
     }
+
+  putc ('.', file);
 #endif
   return;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -14320,20 +14322,21 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     }
   return;
 
+case 'F':
+case 'f':
+#ifdef HAVE_AS_IX86_CMOV_SUN_SYNTAX
+  if (ASSEMBLER_DIALECT == ASM_ATT)
+    putc ('.', file);
+#endif
+
 case 'C':
 case 'c':
-case 'F':
-case 'f':
   if (!COMPARISON_P (x))
     {
       output_operand_lossage ("operand is not a condition code, "
       "invalid operand code '%c'", code);
       return;
     }
-#ifdef HAVE_AS_IX86_CMOV_SUN_SYNTAX
-  if (ASSEMBLER_DIALECT == ASM_ATT)
-    putc ('.', file);
-#endif
   put_condition_code (GET_CODE (x), GET_MODE (XEXP (x, 0)),
       code == 'c' || code == 'f',
       code == 'F' || code == 'f',
&lt;/pre&gt;</description>
    <dc:creator>Uros Bizjak</dc:creator>
    <dc:date>2012-05-25T15:12:14</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263814">
    <title>[gimplefe] Fix parsing of assign_stmt (issue6247046)</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263814</link>
    <description>&lt;pre&gt;Fix parser initialization and parsing of gimple_assign.

This patch fixes the parser to use the new line map table
initialization code. It was not setting the allocation function
pointers properly.

Additionally, we were only expecting binary RHS for gimple_assign.
This was causing failures in the small test file I added yesterday.

Sandeep, now that we have an initial harness for testing, could you
please add a set of .gimple files that test the *whole* gimple
grammar? (or at least a large chunk of it).

An initial starting point would be to use -fdump-tree-gimple-raw on
the compilation of several C/C++ source files.  This will give you an
initial set of test cases to put in the testsuite to exercise the
recognizer.

Tested on x86_64.

2012-05-25   Diego Novillo  &amp;lt;dnovillo&amp;lt; at &amp;gt;google.com&amp;gt;

gimple/ChangeLog
* parser.c (gimple_register_var_decl_in_symtab): Tidy.
(gl_peek_token): New.
(gl_consume_token): Call it.
(gl_tree_code_for_token): Add FIXME note.
(gl_gimple_code_for_token): Likewise.
(gl_dump): Surround the current token in '[[[' ']]]'.
(gl_consume_expected_token): Only emit an error if no other errors
have been emitted.
(gp_parse_expect_subcode): Return the recognized code.  Return
the read token in new argument *TOKEN_P.
Update all callers.
(gp_parse_expect_lhs): Call gl_peek_token.
(gp_parse_expect_rhs_op): Rename from gp_parse_expect_rhs1.
Call gl_peek_token.
(gp_parse_expect_rhs2): Remove.
(gp_parse_assign_stmt): Re-write to support all gimple RHS
classes.
(gp_parse_cond_stmt): Tidy.
Emit an error if OPCODE is anything but a GIMPLE_BINARY_RHS.
(gp_parse_goto_stmt): Tidy.
(gp_parse_label_stmt): Tidy.
(gp_parse_switch_stmt): Tidy.
(gp_parse_stmt): Do not emit an error if one has been emitted
already.
(realloc_for_line_map): New.
(gp_init): Use it.
Update code to initialize the line table.
(gimple_main): Tidy.

testsuite/ChangeLog.gimplefe:

* gimple.dg/20120523-1.gimple: Add expected error.
* gimple.dg/20120525-1.gimple: New.

diff --git a/gcc/gimple/parser.c b/gcc/gimple/parser.c
index 4b29333..3f3eb96 100644
--- a/gcc/gimple/parser.c
+++ b/gcc/gimple/parser.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -152,10 +152,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gl_token_as_text (const gimple_token *token)
 static void
 gimple_register_var_decl_in_symtab (const gimple_token *name_token)
 {
-  const char *name = gl_token_as_text(name_token);
-  tree id = get_identifier(name);
-  tree decl = build_decl(name_token-&amp;gt;location, VAR_DECL, get_identifier(name), void_type_node);
-
+  const char *name = gl_token_as_text (name_token);
+  tree id = get_identifier (name);
+  tree decl = build_decl (name_token-&amp;gt;location, VAR_DECL,
+  get_identifier(name), void_type_node);
   gimple_symtab_register_decl (decl,id);
 }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -168,15 +168,25 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gl_at_eof (gimple_lexer *lexer)
 }
 
 
-/* Consume the next token from LEXER.  */
+/* Peek into the next token from LEXER.  */
 
 static gimple_token *
-gl_consume_token (gimple_lexer *lexer)
+gl_peek_token (gimple_lexer *lexer)
 {
   if (gl_at_eof (lexer))
     return &amp;amp;gl_eof_token;
+  return VEC_index (gimple_token, lexer-&amp;gt;tokens, lexer-&amp;gt;cur_token_ix);
+}
 
-  return VEC_index (gimple_token, lexer-&amp;gt;tokens, lexer-&amp;gt;cur_token_ix++);
+
+/* Consume the next token from LEXER.  */
+
+static gimple_token *
+gl_consume_token (gimple_lexer *lexer)
+{
+  gimple_token *tok = gl_peek_token (lexer);
+  lexer-&amp;gt;cur_token_ix++;
+  return tok;
 }
 
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -189,6 +199,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gl_tree_code_for_token (const gimple_token *token)
   size_t code;
   const char *s;
 
+  /* FIXME.  Expensive linear scan, convert into a string-&amp;gt;code map.  */
   s = gl_token_as_text (token);
   for (code = ERROR_MARK; code &amp;lt; LAST_AND_UNUSED_TREE_CODE; code++)
     if (strcasecmp (s, tree_code_name[code]) == 0)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -207,6 +218,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gl_gimple_code_for_token (const gimple_token *token)
   size_t code;
   const char *s;
 
+  /* FIXME.  Expensive linear scan, convert into a string-&amp;gt;code map.  */
   s = gl_token_as_text (token);
   for (code = GIMPLE_ERROR_MARK; code &amp;lt; LAST_AND_UNUSED_GIMPLE_CODE; code++)
     if (strcasecmp (s, gimple_code_name[code]) == 0)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -215,6 +227,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gl_gimple_code_for_token (const gimple_token *token)
   return (enum gimple_code) code;
 }
 
+
 /* Return true if TOKEN is the start of a declaration.  */
 
 static bool
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -272,7 +285,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gl_dump (FILE *file, gimple_lexer *lexer)
    lexer-&amp;gt;cur_token_ix);
 
   for (i = 0; VEC_iterate (gimple_token, lexer-&amp;gt;tokens, i, token); i++)
-    gl_dump_token (file, token);
+    {
+      if (i == lexer-&amp;gt;cur_token_ix)
+fprintf (file, "[[[ ");
+      gl_dump_token (file, token);
+      if (i == lexer-&amp;gt;cur_token_ix)
+fprintf (file, "]]]");
+    }
+
+  fprintf (file, "\n");
 }
 
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -293,7 +314,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static const gimple_token *
 gl_consume_expected_token (gimple_lexer *lexer, enum cpp_ttype expected)
 {
   const gimple_token *next_token = gl_consume_token (lexer);
-  if (next_token-&amp;gt;type != expected)
+  if (next_token-&amp;gt;type != expected &amp;amp;&amp;amp; !errorcount)
     error_at (next_token-&amp;gt;location,
       "token '%s' is not of the expected type '%s'",
       gl_token_as_text (next_token), cpp_type2name (expected, 0));
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -303,13 +324,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gl_consume_expected_token (gimple_lexer *lexer, enum cpp_ttype expected)
 
 
 /* Helper for gp_parse_assign_stmt and gp_parse_cond_stmt.
-   Peeks a token by reading from reader PARSER and looks it up to match 
-   against the tree codes.  */
+   Consumes a token by reading from reader PARSER and looks it up to match
+   against the tree codes.  Returns the tree code or emits a diagnostic
+   if no valid tree code was found.  Additionally, if TOKEN_P is not
+   NULL, it returns the read token in *TOKEN_P.  */
 
-static void
-gp_parse_expect_subcode (gimple_parser *parser)
+static enum tree_code
+gp_parse_expect_subcode (gimple_parser *parser, gimple_token **token_p)
 {
-  const gimple_token *next_token;
+  gimple_token *next_token;
   enum tree_code code;
 
   gl_consume_expected_token (parser-&amp;gt;lexer, CPP_LESS);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -327,8 +350,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gp_parse_expect_subcode (gimple_parser *parser)
 
   gl_consume_expected_token (parser-&amp;gt;lexer, CPP_COMMA);
 
-  /* FIXME From this function we should return the tree code since it
-     can be used by the other helper functions to recognize precisely.  */
+  if (token_p)
+    *token_p = next_token;
+
+  return code;
 }
 
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -343,7 +368,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gp_parse_expect_lhs (gimple_parser *parser)
   /* Just before the name of the identifier we might get the symbol 
      of dereference too. If we do get it then consume that token, else
      continue recognizing the name.  */
-  next_token = gl_consume_token (parser-&amp;gt;lexer);
+  next_token = gl_peek_token (parser-&amp;gt;lexer);
   if (next_token-&amp;gt;type == CPP_MULT)
     next_token = gl_consume_token (parser-&amp;gt;lexer);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -351,15 +376,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gp_parse_expect_lhs (gimple_parser *parser)
   gl_consume_expected_token (parser-&amp;gt;lexer, CPP_COMMA);
 }
 
+
 /* Helper for gp_parse_assign_stmt. The token read from reader PARSER should 
    be the first operand in rhs of the tuple.  */
 
 static void 
-gp_parse_expect_rhs1 (gimple_parser *parser)
+gp_parse_expect_rhs_op (gimple_parser *parser)
 {
   const gimple_token *next_token;
 
-  next_token = gl_consume_token (parser-&amp;gt;lexer);
+  next_token = gl_peek_token (parser-&amp;gt;lexer);
 
   /* Currently there is duplication in the following blocks but there
      would be more stuff added here as we go on.  */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -381,50 +407,58 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gp_parse_expect_rhs1 (gimple_parser *parser)
     default:
       break;
     }
-
-  gl_consume_expected_token (parser-&amp;gt;lexer, CPP_COMMA); 
 }
 
 
-/* Helper for gp_parse_assign_stmt. The token read from reader PARSER should 
-   be the second operand in rhs of the tuple.  */
+/* Parse a gimple_assign tuple that is read from the reader PARSER.
+   For now we only recognize the tuple. Refer gimple.def for the
+   format of this tuple.  */
 
 static void 
-gp_parse_expect_rhs2 (gimple_parser *parser)
+gp_parse_assign_stmt (gimple_parser *parser)
 {
-  const gimple_token *next_token;
-  next_token = gl_consume_token (parser-&amp;gt;lexer);
+  gimple_token *optoken;
+  enum tree_code opcode;
+  enum gimple_rhs_class rhs_class;
 
-  /* ??? Can there be more possibilities than these ?  */
-  switch (next_token-&amp;gt;type)
+  opcode = gp_parse_expect_subcode (parser, &amp;amp;optoken);
+  gp_parse_expect_lhs (parser);
+
+  rhs_class = get_gimple_rhs_class (opcode);
+  switch (rhs_class)
     {
-    case CPP_NAME:
-      /* Handle a special case, this can be NULL too.  */
+      case GIMPLE_INVALID_RHS:
+error_at (optoken-&amp;gt;location, "Invalid RHS for "
+  "gimple assignment: %s", tree_code_name[opcode]);
+break;
 
-    case CPP_NUMBER:
-      break;
+      case GIMPLE_SINGLE_RHS:
+      case GIMPLE_UNARY_RHS:
+      case GIMPLE_BINARY_RHS:
+      case GIMPLE_TERNARY_RHS:
+gp_parse_expect_rhs_op (parser);
+if (rhs_class == GIMPLE_BINARY_RHS || rhs_class == GIMPLE_TERNARY_RHS)
+  {
+    gl_consume_expected_token (parser-&amp;gt;lexer, CPP_COMMA);
+    gp_parse_expect_rhs_op (parser);
+  }
+if (rhs_class == GIMPLE_TERNARY_RHS)
+  {
+    gl_consume_expected_token (parser-&amp;gt;lexer, CPP_COMMA);
+    gp_parse_expect_rhs_op (parser);
+  }
+break;
 
-    default:
-      break;
+      default:
+gcc_unreachable ();
     }
 
-  gl_consume_expected_token (parser-&amp;gt;lexer, CPP_GREATER);  
-}
-
-/* Parse a gimple_assign tuple that is read from the reader PARSER. For now we 
-   only recognize the tuple. Refer gimple.def for the format of this tuple.  */
-
-static void 
-gp_parse_assign_stmt (gimple_parser *parser)
-{
-  gp_parse_expect_subcode (parser);
-  gp_parse_expect_lhs (parser);
-  gp_parse_expect_rhs1 (parser);
-  gp_parse_expect_rhs2 (parser);
+  gl_consume_expected_token (parser-&amp;gt;lexer, CPP_GREATER);
 }
 
 /* Helper for gp_parse_cond_stmt. The token read from reader PARSER should
    be the first operand in the tuple.  */
+
 static void
 gp_parse_expect_op1 (gimple_parser *parser)
 {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -498,21 +532,26 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gp_parse_expect_false_label (gimple_parser *parser)
   gl_consume_expected_token (parser-&amp;gt;lexer, CPP_GREATER);
 }
 
-/* Parse a gimple_cond tuple that is read from the reader PARSER. For now we only 
-   recognize the tuple. Refer gimple.def for the format of this tuple.  */
+/* Parse a gimple_cond tuple that is read from the reader PARSER. For
+   now we only recognize the tuple. Refer gimple.def for the format of
+   this tuple.  */
 
 static void
 gp_parse_cond_stmt (gimple_parser *parser)
 {
-  gp_parse_expect_subcode (parser);
+  gimple_token *optoken;
+  enum tree_code opcode = gp_parse_expect_subcode (parser, &amp;amp;optoken);
+  if (get_gimple_rhs_class (opcode) != GIMPLE_BINARY_RHS)
+    error_at (optoken-&amp;gt;location, "Unsupported gimple_cond expression");
   gp_parse_expect_op1 (parser);
   gp_parse_expect_op2 (parser);
   gp_parse_expect_true_label (parser);
   gp_parse_expect_false_label (parser);
 }
 
-/* Parse a gimple_goto tuple that is read from the reader PARSER. For now we only 
-   recognize the tuple. Refer gimple.def for the format of this tuple.  */
+/* Parse a gimple_goto tuple that is read from the reader PARSER. For
+   now we only recognize the tuple. Refer gimple.def for the format of
+   this tuple.  */
 
 static void
 gp_parse_goto_stmt (gimple_parser *parser)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -524,8 +563,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gp_parse_goto_stmt (gimple_parser *parser)
   gl_consume_expected_token (parser-&amp;gt;lexer, CPP_GREATER);
 }
 
-/* Parse a gimple_label tuple that is read from the reader PARSER. For now we only 
-   recognize the tuple. Refer gimple.def for the format of this tuple.  */
+/* Parse a gimple_label tuple that is read from the reader PARSER. For
+   now we only recognize the tuple. Refer gimple.def for the format of
+   this tuple.  */
 
 static void
 gp_parse_label_stmt (gimple_parser *parser)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -537,8 +577,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gp_parse_label_stmt (gimple_parser *parser)
   gl_consume_expected_token (parser-&amp;gt;lexer, CPP_GREATER);  
 }
 
-/* Parse a gimple_switch tuple that is read from the reader PARSER. For now we only 
-   recognize the tuple. Refer gimple.def for the format of this tuple.  */
+/* Parse a gimple_switch tuple that is read from the reader PARSER.
+   For now we only recognize the tuple. Refer gimple.def for the
+   format of this tuple.  */
 
 static void
 gp_parse_switch_stmt (gimple_parser *parser)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -575,6 +616,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gp_parse_switch_stmt (gimple_parser *parser)
     }
 }
 
+
 /* Helper for gp_parse_call_stmt. The token read from reader PARSER should
    be the name of the function called.  */
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -677,7 +719,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gp_parse_stmt (gimple_parser *parser, const gimple_token *token)
 {
   enum gimple_code code = gl_gimple_code_for_token (token);
 
-  if (code == LAST_AND_UNUSED_GIMPLE_CODE)
+  if (code == LAST_AND_UNUSED_GIMPLE_CODE &amp;amp;&amp;amp; !errorcount)
     error_at (token-&amp;gt;location, "Invalid gimple code used"); 
   else
     {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1077,6 +1119,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gl_init (gimple_parser *parser, const char *fname)
 }
 
 
+/* A helper function; used as the reallocator function for cpp's line
+   table.  */
+
+static void *
+realloc_for_line_map (void *ptr, size_t len)
+{
+  return GGC_RESIZEVAR (void, ptr, len);
+}
+
+
 /* Initialize the parser data structures.  FNAME is the name of the input
    gimple file being compiled.  */
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1084,10 +1136,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static gimple_parser *
 gp_init (const char *fname)
 {
   gimple_parser *parser = ggc_alloc_cleared_gimple_parser ();
-  line_table = parser-&amp;gt;line_table = ggc_alloc_cleared_line_maps ();
-  parser-&amp;gt;ident_hash = ident_hash;
-  
+  line_table = parser-&amp;gt;line_table = ggc_alloc_line_maps ();
   linemap_init (parser-&amp;gt;line_table);
+  parser-&amp;gt;line_table-&amp;gt;reallocator = realloc_for_line_map;
+  parser-&amp;gt;line_table-&amp;gt;round_alloc_size = ggc_round_alloc_size;
+  parser-&amp;gt;ident_hash = ident_hash;
   parser-&amp;gt;lexer = gl_init (parser, fname);
 
   return parser;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1559,7 +1612,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gimple_main (void)
   if (parser-&amp;gt;lexer-&amp;gt;filename == NULL)
     return;
 
-  gimple_symtab_maybe_init_hash_table();
+  gimple_symtab_maybe_init_hash_table ();
   gl_lex (parser-&amp;gt;lexer);
   gp_parse (parser);
   gp_finish (parser);
diff --git a/gcc/testsuite/gimple.dg/20120523-1.gimple b/gcc/testsuite/gimple.dg/20120523-1.gimple
index 54c39ac..c73db3f 100644
--- a/gcc/testsuite/gimple.dg/20120523-1.gimple
+++ b/gcc/testsuite/gimple.dg/20120523-1.gimple
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,2 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-gimple_assign &amp;lt;modify_expr, a, 12.3&amp;gt;
-
+gimple_assign &amp;lt;modify_expr, a, 12.3&amp;gt;/* { dg-error "Invalid RHS.*modify_expr" } */
diff --git a/gcc/testsuite/gimple.dg/20120525-1.gimple b/gcc/testsuite/gimple.dg/20120525-1.gimple
new file mode 100644
index 0000000..0e21396
--- /dev/null
+++ b/gcc/testsuite/gimple.dg/20120525-1.gimple
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+gimple_assign &amp;lt;integer_cst, a, 12.3&amp;gt;

--
This patch is available for review at http://codereview.appspot.com/6247046

&lt;/pre&gt;</description>
    <dc:creator>Diego Novillo</dc:creator>
    <dc:date>2012-05-25T15:04:03</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263810">
    <title>unwind.h installation causes rebuilds</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263810</link>
    <description>&lt;pre&gt;Hi,

I've noticed that libitm is always rebuild with a non-bootstrap tree even 
with merely a sequence of two makes.  The reason turns out to be that 
installation of unwind.h from libgcc, which is always done with a simple 
make:

# make
# make -d
...
dest=../.././gcc/include/tmp$$-unwind.h; \
        cp unwind.h $dest; \
        chmod a+r $dest; \
        sh ../../../gcc/libgcc/../move-if-change $dest ../.././gcc/include/unwind.h

(this is still fine, because it uses move-if-change)

...

make install-leaf DESTDIR=../.././gcc \
          slibdir= libsubdir= MULTIOSDIR=.
...
/bin/sh ../../../gcc/libgcc/../mkinstalldirs ../.././gcc/include
/usr/bin/install -c -m 644 unwind.h ../.././gcc/include

This one updates the mtime of gcc/include/unwind.h, and is the problematic 
one, ultimately resulting in:

     Prerequisite `/matz/gcc/svn/real-trunk/dev/gcc/include/unwind.h' is 
     newer than target `aatree.lo'.

And all of libitm (our only c++ library) is rebuilt as all objects therein 
have a dependency on unwind.h.

There are multiple variants to fix:
a) use install -p (or -C) generally for all INSTALLs in all makefiles
b) use a) for only libgcc Makefile
c) don't repeatedly install the same files on a remake even though nothing 
   was compiled newly (perhaps some stamp files could be used to make 
   leaf-install a no-op if nothing new was built?)

I've checked that hardcoding -p for INSTALL in the top-level Makefile 
solves this problem (see patch), but perhaps you prefer one of the others 
(or can think of something else entirely).


Ciao,
Michael.
Index: configure.ac
===================================================================
--- configure.ac(revision 187708)
+++ configure.ac(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -93,8 +93,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
 
 # We pass INSTALL explicitly to sub-makes.  Make sure that it is not
 # a relative path.
-if test "$INSTALL" = "${srcdir}/install-sh -c"; then
-  INSTALL="${srcpwd}/install-sh -c"
+if test "$INSTALL" = "${srcdir}/install-sh -c -p"; then
+  INSTALL="${srcpwd}/install-sh -c -p"
 fi
 
 # Set srcdir to "." if that's what it is.
Index: config/proginstall.m4
===================================================================
--- config/proginstall.m4(revision 187708)
+++ config/proginstall.m4(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -54,12 +54,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; case $as_dir/ in
     echo one &amp;gt; conftest.one
     echo two &amp;gt; conftest.two
     mkdir conftest.dir
-    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &amp;amp;&amp;amp;
+    if "$as_dir/$ac_prog$ac_exec_ext" -c -p conftest.one conftest.two "`pwd`/conftest.dir" &amp;amp;&amp;amp;
       test -s conftest.one &amp;amp;&amp;amp; test -s conftest.two &amp;amp;&amp;amp;
       test -s conftest.dir/conftest.one &amp;amp;&amp;amp;
       test -s conftest.dir/conftest.two
     then
-      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c -p"
       break 3
     fi
   fi

&lt;/pre&gt;</description>
    <dc:creator>Michael Matz</dc:creator>
    <dc:date>2012-05-25T14:30:45</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263792">
    <title>PR middle-end/53008 (trans-mem): output clone if function accessed indirectly</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263792</link>
    <description>&lt;pre&gt;This is a patch from Patrick, based on an earlier patch by Dave 
Boutcher.  Thanks folks.

In the failing testcase below we have a transaction_safe function being 
accessed indirectly, but for -O1 and above, the corresponding clone is 
not generated because we think it is unused.  Fixed by forcing the clone 
output if it is accessed indirectly.

Tested on x86-64 Linux.

OK?  Would this be acceptable for the 4.7 branch as well?
PR middle-end/53008
* trans-mem.c (ipa_tm_create_version_alias): Output new_node if
accessed indirectly.
(ipa_tm_create_version): Same.

Index: testsuite/gcc.dg/tm/pr53008.c
===================================================================
--- testsuite/gcc.dg/tm/pr53008.c(revision 0)
+++ testsuite/gcc.dg/tm/pr53008.c(revision 0)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* { dg-do compile } */
+/* { dg-options "-fgnu-tm -O" } */
+
+void __attribute__((transaction_safe)) (*fn)(void);
+
+static void __attribute__((transaction_safe))
+foo(void)
+{
+}
+
+void set_fn(void)
+{
+  fn = foo;
+}
Index: trans-mem.c
===================================================================
--- trans-mem.c(revision 187729)
+++ trans-mem.c(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4328,7 +4328,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; ipa_tm_create_version_alias (struct cgra
 
   record_tm_clone_pair (old_decl, new_decl);
 
-  if (info-&amp;gt;old_node-&amp;gt;symbol.force_output)
+  if (info-&amp;gt;old_node-&amp;gt;symbol.force_output
+      || ipa_ref_list_first_referring (&amp;amp;info-&amp;gt;old_node-&amp;gt;symbol.ref_list))
     ipa_tm_mark_force_output_node (new_node);
   return false;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4381,7 +4382,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; ipa_tm_create_version (struct cgraph_nod
   record_tm_clone_pair (old_decl, new_decl);
 
   cgraph_call_function_insertion_hooks (new_node);
-  if (old_node-&amp;gt;symbol.force_output)
+  if (old_node-&amp;gt;symbol.force_output
+      || ipa_ref_list_first_referring (&amp;amp;old_node-&amp;gt;symbol.ref_list))
     ipa_tm_mark_force_output_node (new_node);
 
   /* Do the same thing, but for any aliases of the original node.  */
&lt;/pre&gt;</description>
    <dc:creator>Aldy Hernandez</dc:creator>
    <dc:date>2012-05-25T13:25:47</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263790">
    <title>[PATCH][revised] PR debug/53453 ensure debug notes linked on darwin</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263790</link>
    <description>&lt;pre&gt;   The attached patch solves PR53453. The upcoming dsymutil release will now issue
a warning when no debug notes are emitted for an object file on linkage. This causes
several thousand failures in the FSF gcc testsuite. The origin of this problem is
that the darwin linker requires the presence of both AT_name and AT_comp_dir attributes
for each object file otherwise their debug notes will be omitted on linkage. The 
patch adds a new TARGET_FORCE_AT_COMP_DIR target hook for darwin so that AT_comp_dir 
will be present for all object files. Bootstrap and regression tested on x86_64-apple-darwin12.

http://gcc.gnu.org/ml/gcc-testresults/2012-05/msg02331.html

Okay for gcc trunk and later gcc-4_7-branch and gcc-4_6-branch?
                  Jack
ps Note that this is a pre-existing problem on darwin and that the newer dsymutil simply
has alerted us to the issue.
pps Added correction of s/AT_comp_dir/DW_AT_comp_dir/g to gcc/target.def change.

2012-05-24  Jack Howarth  &amp;lt;howarth&amp;lt; at &amp;gt;bromo.med.uc.edu&amp;gt;

PR debug/53453
* doc/tm.texi: Update.
* doc/tm.texi.in (SDB and DWARF) &amp;lt;TARGET_FORCE_AT_COMP_DIR&amp;gt;: Add &amp;lt; at &amp;gt;hook.
* target-def (force_at_comp_dir): New hook.
* config/darwin.h (TARGET_FORCE_AT_COMP_DIR): Define.
* dwarf2out.c (dwarf2out_finish): Check targetm.force_at_comp_dir.


Index: gcc/doc/tm.texi.in
===================================================================
--- gcc/doc/tm.texi.in(revision 187856)
+++ gcc/doc/tm.texi.in(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -9392,6 +9392,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; tables, and hence is desirable if it wor
 
 &amp;lt; at &amp;gt;hook TARGET_WANT_DEBUG_PUB_SECTIONS
 
+&amp;lt; at &amp;gt;hook TARGET_FORCE_AT_COMP_DIR
+
 &amp;lt; at &amp;gt;hook TARGET_DELAY_SCHED2
 
 &amp;lt; at &amp;gt;hook TARGET_DELAY_VARTRACK
Index: gcc/target.def
===================================================================
--- gcc/target.def(revision 187856)
+++ gcc/target.def(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2749,6 +2749,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; DEFHOOKPOD
  bool, false)
 
 DEFHOOKPOD
+(force_at_comp_dir,
+ "True if the &amp;lt; at &amp;gt;code{DW_AT_comp_dir} attribute should be emitted for each \
+ compilation unit.  This attribute is required for the darwin linker \
+ to emit debug information.",
+ bool, false)
+
+DEFHOOKPOD
 (delay_sched2, "True if sched2 is not to be run at its normal place.  \
 This usually means it will be run as part of machine-specific reorg.",
 bool, false)
Index: gcc/dwarf2out.c
===================================================================
--- gcc/dwarf2out.c(revision 187856)
+++ gcc/dwarf2out.c(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -21949,7 +21949,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; dwarf2out_finish (const char *filename)
   /* Add the name for the main input file now.  We delayed this from
      dwarf2out_init to avoid complications with PCH.  */
   add_name_attribute (comp_unit_die (), remap_debug_filename (filename));
-  if (!IS_ABSOLUTE_PATH (filename))
+  if (!IS_ABSOLUTE_PATH (filename) || targetm.force_at_comp_dir)
     add_comp_dir_attribute (comp_unit_die ());
   else if (get_AT (comp_unit_die (), DW_AT_comp_dir) == NULL)
     {
Index: gcc/config/darwin.h
===================================================================
--- gcc/config/darwin.h(revision 187856)
+++ gcc/config/darwin.h(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -414,6 +414,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; extern GTY(()) int darwin_ms_struct;
 
 #define TARGET_WANT_DEBUG_PUB_SECTIONS true
 
+#define TARGET_FORCE_AT_COMP_DIR true
+
 /* When generating stabs debugging, use N_BINCL entries.  */
 
 #define DBX_USE_BINCL

&lt;/pre&gt;</description>
    <dc:creator>Jack Howarth</dc:creator>
    <dc:date>2012-05-25T13:17:20</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263787">
    <title>[PATCH] omit -lcrt1.10.6.o and pass -no_new_main with -pg ondarwin &gt;= 10.8</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263787</link>
    <description>&lt;pre&gt;   The attached patch limits the linkage of -lcrt1.10.6.o to darwin10 and darwin11
since its usage is deprecated in the 10.8sdk. The patch also solves radr://11491405,
"-pg broken for -mmacosx-version-min=10.8"...

19-May-2012 11:10 PM Jack Howarth:
Summary: The default  -mmacosx-version-min=10.8 under Xcode 4.4 breaks a number of FSF gcc tests which rely on -pg. such as...

FAIL: gcc.dg/nest.c execution test
FAIL: gcc.dg/nested-func-4.c execution test

Steps to Reproduce:
The attached compressed archive for xcodebug_pg_10.8.tar.bz2 contains the files from compiling these test cases with...

gcc-fsf-4.7 /sw/src/fink.build/gcc47-4.7.1-1000/gcc-4.7-20120518/gcc/testsuite/gcc.dg/nest.c --save-temps -v  -O2 -pg -lm -m32 -o ./nest.exe

and

gcc-fsf-4.7 /sw/src/fink.build/gcc47-4.7.1-1000/gcc-4.7-20120518/gcc/testsuite/gcc.dg/nested-func-4.c -v --save-temps -pg -lm -m32 -o ./nested-func-4.exe

as well as shell scripts for bad_runs.sh and bad_runs2.sh to execute each of the miscompiled binaries against the bundled FSF gcc shared library for libgcc_s.1.dylib.

Expected Results:
The nest.exe and nested-func-4.exe test cases should execute without errors as they do when built with the  -mmacosx-version-min=10.7 flag.

Actual Results:
In both cases, these test case fail with the error...

dyld: no valid entry point

The patch implements the recommended approach from the darwin linker developer of passing -no_new_main to the linker
when targeting 10.8 or later which tells the linker to look for "start" instead of "_main". Otherwise the linker sets up
_main as the entry point and _moninit is never called, resulting in a runtime error. Bootstrap and regression tested
on x86_64-apple-darwin12. 

http://gcc.gnu.org/ml/gcc-testresults/2012-05/msg02331.html

Okay for gcc trunk and later gcc-4_7-branch and gcc-4_6-branch?
            Jack


2012-05-24  Jack Howarth  &amp;lt;howarth&amp;lt; at &amp;gt;bromo.med.uc.edu&amp;gt;

* config/darwin.h (STARTFILE_SPEC): Use -no_new_main with -lgcrt1.o
on Darwin &amp;gt;= 12.
(DARWIN_CRT1_SPEC): Use -lcrt1.10.6.o when Darwin &amp;gt;= 10 and &amp;lt; 12.

--- gcc/config/darwin.h(revision 187856)
+++ gcc/config/darwin.h(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -356,7 +356,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; extern GTY(()) int darwin_ms_struct;
      %{!Zbundle:%{pg:%{static:-lgcrt0.o}    \
                      %{!static:%{object:-lgcrt0.o}    \
                                %{!object:%{preload:-lgcrt0.o}    \
-                                 %{!preload:-lgcrt1.o %(darwin_crt2)}}}}    \
+                                 %{!preload:-lgcrt1.o                       \
+                                 %:version-compare(&amp;gt;= 10.8 mmacosx-version-min= -no_new_main) \
+                                 %(darwin_crt2)}}}}    \
                 %{!pg:%{static:-lcrt0.o}    \
                       %{!static:%{object:-lcrt0.o}    \
                                 %{!object:%{preload:-lcrt0.o}    \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -379,7 +381,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; extern GTY(()) int darwin_ms_struct;
 #define DARWIN_CRT1_SPEC\
   "%:version-compare(!&amp;gt; 10.5 mmacosx-version-min= -lcrt1.o)\
    %:version-compare(&amp;gt;&amp;lt; 10.5 10.6 mmacosx-version-min= -lcrt1.10.5.o)\
-   %:version-compare(&amp;gt;= 10.6 mmacosx-version-min= -lcrt1.10.6.o)\
+   %:version-compare(&amp;gt;&amp;lt; 10.6 10.8 mmacosx-version-min= -lcrt1.10.6.o)\
    %{fgnu-tm: -lcrttms.o}"
 
 /* Default Darwin ASM_SPEC, very simple.  */

&lt;/pre&gt;</description>
    <dc:creator>Jack Howarth</dc:creator>
    <dc:date>2012-05-25T13:06:51</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.patches/263786">
    <title>[PATCH] PR debug/53453 ensure debug notes linked on darwin</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.patches/263786</link>
    <description>&lt;pre&gt;   The attached patch solves PR53453. The upcoming dsymutil release will now issue
a warning when no debug notes are emitted for an object file on linkage. This causes
several thousand failures in the FSF gcc testsuite. The origin of this problem is
that the darwin linker requires the presence of both AT_name and AT_comp_dir attributes
for each object file otherwise their debug notes will be omitted on linkage. The 
patch adds a new TARGET_FORCE_AT_COMP_DIR target hook for darwin so that AT_comp_dir 
will be present for all object files. Bootstrap and regression tested on x86_64-apple-darwin12.

http://gcc.gnu.org/ml/gcc-testresults/2012-05/msg02331.html

Okay for gcc trunk and later gcc-4_7-branch and gcc-4_6-branch?
                  Jack
ps Note that this is a pre-existing problem on darwin and that the newer dsymutil simply
has alerted us to the issue.

2012-05-24  Jack Howarth  &amp;lt;howarth&amp;lt; at &amp;gt;bromo.med.uc.edu&amp;gt;

PR debug/53453
* doc/tm.texi: Update.
* doc/tm.texi.in (SDB and DWARF) &amp;lt;TARGET_FORCE_AT_COMP_DIR&amp;gt;: Add &amp;lt; at &amp;gt;hook.
* target-def (force_at_comp_dir): New hook.
* config/darwin.h (TARGET_FORCE_AT_COMP_DIR): Define.
* dwarf2out.c (dwarf2out_finish): Check targetm.force_at_comp_dir.


Index: gcc/doc/tm.texi.in
===================================================================
--- gcc/doc/tm.texi.in(revision 187856)
+++ gcc/doc/tm.texi.in(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -9392,6 +9392,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; tables, and hence is desirable if it wor
 
 &amp;lt; at &amp;gt;hook TARGET_WANT_DEBUG_PUB_SECTIONS
 
+&amp;lt; at &amp;gt;hook TARGET_FORCE_AT_COMP_DIR
+
 &amp;lt; at &amp;gt;hook TARGET_DELAY_SCHED2
 
 &amp;lt; at &amp;gt;hook TARGET_DELAY_VARTRACK
Index: gcc/target.def
===================================================================
--- gcc/target.def(revision 187856)
+++ gcc/target.def(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2749,6 +2749,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; DEFHOOKPOD
  bool, false)
 
 DEFHOOKPOD
+(force_at_comp_dir,
+ "True if the &amp;lt; at &amp;gt;code{AT_comp_dir} attribute should be emitted for each \
+ compilation unit.  This attribute is required for the darwin linker \
+ to emit debug information.",
+ bool, false)
+
+DEFHOOKPOD
 (delay_sched2, "True if sched2 is not to be run at its normal place.  \
 This usually means it will be run as part of machine-specific reorg.",
 bool, false)
Index: gcc/dwarf2out.c
===================================================================
--- gcc/dwarf2out.c(revision 187856)
+++ gcc/dwarf2out.c(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -21949,7 +21949,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; dwarf2out_finish (const char *filename)
   /* Add the name for the main input file now.  We delayed this from
      dwarf2out_init to avoid complications with PCH.  */
   add_name_attribute (comp_unit_die (), remap_debug_filename (filename));
-  if (!IS_ABSOLUTE_PATH (filename))
+  if (!IS_ABSOLUTE_PATH (filename) || targetm.force_at_comp_dir)
     add_comp_dir_attribute (comp_unit_die ());
   else if (get_AT (comp_unit_die (), DW_AT_comp_dir) == NULL)
     {
Index: gcc/config/darwin.h
===================================================================
--- gcc/config/darwin.h(revision 187856)
+++ gcc/config/darwin.h(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -414,6 +414,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; extern GTY(()) int darwin_ms_struct;
 
 #define TARGET_WANT_DEBUG_PUB_SECTIONS true
 
+#define TARGET_FORCE_AT_COMP_DIR true
+
 /* When generating stabs debugging, use N_BINCL entries.  */
 
 #define DBX_USE_BINCL

&lt;/pre&gt;</description>
    <dc:creator>Jack Howarth</dc:creator>
    <dc:date>2012-05-25T13:03:02</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.gcc.patches">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.gcc.patches</link>
  </textinput>
</rdf:RDF>

