aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordoko <doko@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-24 21:59:15 +0000
committerdoko <doko@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-24 21:59:15 +0000
commitefb95924eb7d78211e9c6a37d9d3ed3ce797a12a (patch)
tree5d116947762126d594ccaa973c4051a265cac5c6
parent24e2e252152bbb3cdf362f608db721434bd761ef (diff)
svn merge -r128526:128732 svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_2-branch
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/ubuntu/gcc-4_2-branch@128733 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog17
-rw-r--r--gcc/DATESTAMP2
-rwxr-xr-xgcc/configure7
-rw-r--r--gcc/configure.ac7
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/init.c14
-rw-r--r--gcc/dbxout.c6
-rw-r--r--gcc/dwarf2out.c3
-rw-r--r--gcc/testsuite/ChangeLog10
-rw-r--r--gcc/testsuite/g++.dg/init/ref14.C11
-rw-r--r--gcc/testsuite/gcc.dg/debug/pr33316.c15
11 files changed, 79 insertions, 19 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0c82949f94c..9754b181e64 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,20 @@
+2007-09-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/33316
+ * dwarf2out.c (modified_type_die): Handle TYPE_DECL with NULL
+ DECL_NAME.
+ * dbxout.c (dbxout_type): Likewise.
+
+2007-09-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * configure.ac (ld_vers): Support GNU linker version xx.xx.*
+ * configure: Regenerated.
+
+2007-09-23 Jakub Jelinek <jakub@redhat.com>
+
+ * configure.ac (MAKEINFO): Handle makeinfo version 4.10 and above.
+ * configure: Regenerated.
+
2007-09-13 H.J. Lu <hongjiu.lu@intel.com>
PR bootstrap/33418
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index a9b72e3ba29..f794d772e31 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20070916
+20070924
diff --git a/gcc/configure b/gcc/configure
index 1d2698e8366..8f874c27ac3 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -7654,7 +7654,7 @@ else
echo "configure:7654: version of makeinfo is $ac_prog_version" >&5
case $ac_prog_version in
'') gcc_cv_prog_makeinfo_modern=no;;
- 4.[4-9]*)
+ 4.[4-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*)
gcc_cv_prog_makeinfo_modern=yes;;
*) gcc_cv_prog_makeinfo_modern=no;;
esac
@@ -13937,10 +13937,7 @@ else
ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
if echo "$ld_ver" | grep GNU > /dev/null; then
ld_vers=`echo $ld_ver | sed -n \
- -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
- -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
- -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
- -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
+ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p' \
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
diff --git a/gcc/configure.ac b/gcc/configure.ac
index d45e073d1b6..617bb76d115 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -877,7 +877,7 @@ MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing"
# that we can use it.
gcc_AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version,
[GNU texinfo.* \([0-9][0-9.]*\)],
- [4.[4-9]*])
+ [4.[4-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*])
if test $gcc_cv_prog_makeinfo_modern = no; then
MAKEINFO="$MISSING makeinfo"
AC_MSG_WARN([
@@ -2093,10 +2093,7 @@ else
if echo "$ld_ver" | grep GNU > /dev/null; then
changequote(,)dnl
ld_vers=`echo $ld_ver | sed -n \
- -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
- -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
- -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
- -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
+ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p' \
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6a1d20d8728..25a77608394 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2007-09-20 Paolo Carlini <pcarlini@suse.de>
+
+ PR c++/33459
+ * init.c (build_zero_init): If, recursively, build_zero_init
+ returns a NULL_TREE, do not append it to the VEC of constructors.
+
2007-09-13 Jason Merrill <jason@redhat.com>
PR c++/15097
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 3c570c842f3..993b49af9b3 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -136,11 +136,12 @@ initialize_vtbl_ptrs (tree addr)
/* Return an expression for the zero-initialization of an object with
type T. This expression will either be a constant (in the case
that T is a scalar), or a CONSTRUCTOR (in the case that T is an
- aggregate). In either case, the value can be used as DECL_INITIAL
- for a decl of the indicated TYPE; it is a valid static initializer.
- If NELTS is non-NULL, and TYPE is an ARRAY_TYPE, NELTS is the
- number of elements in the array. If STATIC_STORAGE_P is TRUE,
- initializers are only generated for entities for which
+ aggregate), or NULL (in the case that T does not require
+ initialization). In either case, the value can be used as
+ DECL_INITIAL for a decl of the indicated TYPE; it is a valid static
+ initializer. If NELTS is non-NULL, and TYPE is an ARRAY_TYPE, NELTS
+ is the number of elements in the array. If STATIC_STORAGE_P is
+ TRUE, initializers are only generated for entities for which
zero-initialization does not simply mean filling the storage with
zero bytes. */
@@ -199,7 +200,8 @@ build_zero_init (tree type, tree nelts, bool static_storage_p)
tree value = build_zero_init (TREE_TYPE (field),
/*nelts=*/NULL_TREE,
static_storage_p);
- CONSTRUCTOR_APPEND_ELT(v, field, value);
+ if (value)
+ CONSTRUCTOR_APPEND_ELT(v, field, value);
}
/* For unions, only the first field is initialized. */
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index e7553edb4de..963f5a3ce49 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -2023,7 +2023,11 @@ dbxout_type (tree type, int full)
another type's definition; instead, output an xref
and let the definition come when the name is defined. */
stabstr_S ((TREE_CODE (type) == RECORD_TYPE) ? "xs" : "xu");
- if (TYPE_NAME (type) != 0)
+ if (TYPE_NAME (type) != 0
+ /* The C frontend creates for anonymous variable length
+ records/unions TYPE_NAME with DECL_NAME NULL. */
+ && (TREE_CODE (TYPE_NAME (type)) != TYPE_DECL
+ || DECL_NAME (TYPE_NAME (type))))
dbxout_type_name (type);
else
{
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 6c764166de4..2d8932ae358 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -8518,7 +8518,8 @@ modified_type_die (tree type, int is_const_type, int is_volatile_type,
don't output a DW_TAG_typedef, since there isn't one in the
user's program; just attach a DW_AT_name to the type. */
if (name
- && (TREE_CODE (name) != TYPE_DECL || TREE_TYPE (name) == qualified_type))
+ && (TREE_CODE (name) != TYPE_DECL
+ || (TREE_TYPE (name) == qualified_type && DECL_NAME (name))))
{
if (TREE_CODE (name) == TYPE_DECL)
/* Could just call add_name_and_src_coords_attributes here,
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 86a0d88d6a0..7bfa71fc79c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,13 @@
+2007-09-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/33316
+ * gcc.dg/debug/pr33316.c: New test.
+
+2007-09-20 Paolo Carlini <pcarlini@suse.de>
+
+ PR c++/33459
+ * g++.dg/init/ref14.C: New.
+
2007-09-12 John David Anglin <dave.anglin@nrc-crnc.gc.ca>
PR testsuite/33153
diff --git a/gcc/testsuite/g++.dg/init/ref14.C b/gcc/testsuite/g++.dg/init/ref14.C
new file mode 100644
index 00000000000..212e6e95d7e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/ref14.C
@@ -0,0 +1,11 @@
+// PR c++/33459
+
+union A
+{
+ int &i; // { dg-error "may not have reference type" }
+};
+
+void foo()
+{
+ A();
+}
diff --git a/gcc/testsuite/gcc.dg/debug/pr33316.c b/gcc/testsuite/gcc.dg/debug/pr33316.c
new file mode 100644
index 00000000000..d43478bb54f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/pr33316.c
@@ -0,0 +1,15 @@
+/* PR debug/33316 */
+
+int
+foo (void *x, int y)
+{
+ const struct { int d[y]; } *a = x;
+ return a[0].d[0];
+}
+
+int
+bar (void *x, int y)
+{
+ const struct S { int d[y]; } *a = x;
+ return a[0].d[0];
+}