Cherrypick from master 2007-11-15 20:37:07 UTC Jakub Bogusz <qboosh@pld-linux.org> '- fix ICE caught by gettext on mingw32 or cygwin':
gcc-4.1-pr29826.patch -> 1.1
gcc-4.1-texinfo.patch -> 1.1
gcc-ada.patch -> 1.2
--- /dev/null
+2006-10-04 Richard Henderson <rth@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ * tree-ssa-address.c (gen_addr_rtx): Check for const-ness of the
+ address before wrapping in CONST.
+
+Index: tree-ssa-address.c
+===================================================================
+--- tree-ssa-address.c (revision 124014)
++++ tree-ssa-address.c (working copy)
+@@ -1,5 +1,5 @@
+ /* Memory address lowering and addressing mode selection.
+- Copyright (C) 2004 Free Software Foundation, Inc.
++ Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+@@ -134,10 +134,15 @@
+ act_elem = symbol;
+ if (offset)
+ {
+- act_elem = gen_rtx_CONST (Pmode,
+- gen_rtx_PLUS (Pmode, act_elem, offset));
++ act_elem = gen_rtx_PLUS (Pmode, act_elem, offset);
++
+ if (offset_p)
+- *offset_p = &XEXP (XEXP (act_elem, 0), 1);
++ *offset_p = &XEXP (act_elem, 1);
++
++ if (GET_CODE (symbol) == SYMBOL_REF
++ || GET_CODE (symbol) == LABEL_REF
++ || GET_CODE (symbol) == CONST)
++ act_elem = gen_rtx_CONST (Pmode, act_elem);
+ }
+
+ if (*addr)
--- /dev/null
+--- gcc-4.1.2/configure.in.orig 2006-11-21 18:48:36.000000000 +0100
++++ gcc-4.1.2/configure.in 2007-11-15 18:59:16.707713108 +0100
+@@ -2134,7 +2134,7 @@
+ # For an installed makeinfo, we require it to be from texinfo 4.2 or
+ # higher, else we use the "missing" dummy.
+ if ${MAKEINFO} --version \
+- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then
++ | egrep 'texinfo[^0-9]*(4\.([2-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
+ :
+ else
+ MAKEINFO="$MISSING makeinfo"
+--- gcc-4.1.2/configure.orig 2006-11-21 18:48:36.000000000 +0100
++++ gcc-4.1.2/configure 2007-11-15 18:59:16.707713108 +0100
+@@ -2134,7 +2134,7 @@
+ # For an installed makeinfo, we require it to be from texinfo 4.2 or
+ # higher, else we use the "missing" dummy.
+ if ${MAKEINFO} --version \
+- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then
++ | egrep 'texinfo[^0-9]*(4\.([2-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
+ :
+ else
+ MAKEINFO="$MISSING makeinfo"
--- /dev/null
+--- gcc-4_1-branch/gcc/ada/erroutc.adb~ 2005-11-30 12:12:07.000000000 +0100
++++ gcc-4_1-branch/gcc/ada/erroutc.adb 2007-02-08 19:47:25.000000000 +0100
+@@ -39,7 +39,6 @@
+ with Sinput; use Sinput;
+ with Snames; use Snames;
+ with Targparm; use Targparm;
+-with Table;
+ with Uintp; use Uintp;
+
+ package body Erroutc is
+--- /dev/null 2007-01-04 19:59:32.080403511 +0100
++++ gcc-4_1-branch/gcc/ada/s-wchcon.adb 2007-02-08 19:59:59.000000000 +0100
+@@ -0,0 +1,2 @@
++package body System.WCh_Con is
++end System.WCh_Con;
+--- gcc-4_1-branch/gcc/ada/s-wchcon.ads~ 2007-02-08 19:59:57.000000000 +0100
++++ gcc-4_1-branch/gcc/ada/s-wchcon.ads 2007-02-08 20:07:21.000000000 +0100
+@@ -39,6 +39,7 @@
+ -- an appropriate WITH, and the interface can be expected to remain stable.
+
+ package System.WCh_Con is
++ pragma Elaborate_Body;
+ pragma Pure;
+
+ -------------------------------------
+--- gcc-4_1-branch/gcc/ada/sem_attr.adb~ 2005-11-30 12:12:07.000000000 +0100
++++ gcc-4_1-branch/gcc/ada/sem_attr.adb 2007-02-08 20:11:24.000000000 +0100
+@@ -56,7 +56,6 @@
+ with Stand; use Stand;
+ with Sinfo; use Sinfo;
+ with Sinput; use Sinput;
+-with Stand;
+ with Stringt; use Stringt;
+ with Targparm; use Targparm;
+ with Ttypes; use Ttypes;