This commit is contained in:
Jakub Jelinek 2008-03-26 19:56:57 +00:00
parent 56a73f457c
commit 63fa8769db
6 changed files with 2875 additions and 4 deletions

View File

@ -1,2 +1,2 @@
gcc-4.3.0-20080314.tar.bz2
gcc-4.3.0-20080326.tar.bz2
fastjar-0.95.tar.gz

2732
gcc43-libgomp-speedup.patch Normal file

File diff suppressed because it is too large Load Diff

56
gcc43-pr35440.patch Normal file
View File

@ -0,0 +1,56 @@
2008-03-19 Jakub Jelinek <jakub@redhat.com>
PR c/35440
* c-pretty-print.c (pp_c_initializer_list): Handle CONSTRUCTOR
for all types.
* gcc.dg/pr35440.c: New test.
--- gcc/c-pretty-print.c.jj 2008-02-11 14:48:12.000000000 +0100
+++ gcc/c-pretty-print.c 2008-03-19 14:50:09.000000000 +0100
@@ -1173,6 +1173,12 @@ pp_c_initializer_list (c_pretty_printer
tree type = TREE_TYPE (e);
const enum tree_code code = TREE_CODE (type);
+ if (TREE_CODE (e) == CONSTRUCTOR)
+ {
+ pp_c_constructor_elts (pp, CONSTRUCTOR_ELTS (e));
+ return;
+ }
+
switch (code)
{
case RECORD_TYPE:
@@ -1207,16 +1213,12 @@ pp_c_initializer_list (c_pretty_printer
case VECTOR_TYPE:
if (TREE_CODE (e) == VECTOR_CST)
pp_c_expression_list (pp, TREE_VECTOR_CST_ELTS (e));
- else if (TREE_CODE (e) == CONSTRUCTOR)
- pp_c_constructor_elts (pp, CONSTRUCTOR_ELTS (e));
else
break;
return;
case COMPLEX_TYPE:
- if (TREE_CODE (e) == CONSTRUCTOR)
- pp_c_constructor_elts (pp, CONSTRUCTOR_ELTS (e));
- else if (TREE_CODE (e) == COMPLEX_CST || TREE_CODE (e) == COMPLEX_EXPR)
+ if (TREE_CODE (e) == COMPLEX_CST || TREE_CODE (e) == COMPLEX_EXPR)
{
const bool cst = TREE_CODE (e) == COMPLEX_CST;
pp_expression (pp, cst ? TREE_REALPART (e) : TREE_OPERAND (e, 0));
--- gcc/testsuite/gcc.dg/pr35440.c.jj 2008-03-19 15:57:13.000000000 +0100
+++ gcc/testsuite/gcc.dg/pr35440.c 2008-03-19 15:47:35.000000000 +0100
@@ -0,0 +1,12 @@
+/* PR c/35440 */
+/* { dg-do compile } */
+/* { dg-options "-std=gnu99" } */
+
+struct A {};
+struct B { int i; char j[2]; };
+
+void foo (void)
+{
+ (struct A){}(); /* { dg-error "called object" } */
+ (struct B){ .i = 2, .j[1] = 1 }(); /* { dg-error "called object" } */
+}

64
gcc43-pr35546.patch Normal file
View File

@ -0,0 +1,64 @@
2008-03-25 Jakub Jelinek <jakub@redhat.com>
PR c++/35546
* pt.c (apply_late_template_attributes): Don't call tsubst on
first attribute argument if it is IDENTIFIER_NODE.
* g++.dg/ext/attrib33.C: New test.
--- gcc/cp/pt.c.jj 2008-03-10 17:11:48.000000000 +0100
+++ gcc/cp/pt.c 2008-03-25 21:32:17.000000000 +0100
@@ -6717,9 +6717,29 @@ apply_late_template_attributes (tree *de
{
*p = TREE_CHAIN (t);
TREE_CHAIN (t) = NULL_TREE;
- TREE_VALUE (t)
- = tsubst_expr (TREE_VALUE (t), args, complain, in_decl,
- /*integral_constant_expression_p=*/false);
+ /* If the first attribute argument is an identifier, don't
+ pass it through tsubst. Attributes like mode, format,
+ cleanup and several target specific attributes expect it
+ unmodified. */
+ if (TREE_VALUE (t)
+ && TREE_CODE (TREE_VALUE (t)) == TREE_LIST
+ && TREE_VALUE (TREE_VALUE (t))
+ && (TREE_CODE (TREE_VALUE (TREE_VALUE (t)))
+ == IDENTIFIER_NODE))
+ {
+ tree chain
+ = tsubst_expr (TREE_CHAIN (TREE_VALUE (t)), args, complain,
+ in_decl,
+ /*integral_constant_expression_p=*/false);
+ if (chain != TREE_CHAIN (TREE_VALUE (t)))
+ TREE_VALUE (t)
+ = tree_cons (NULL_TREE, TREE_VALUE (TREE_VALUE (t)),
+ chain);
+ }
+ else
+ TREE_VALUE (t)
+ = tsubst_expr (TREE_VALUE (t), args, complain, in_decl,
+ /*integral_constant_expression_p=*/false);
*q = t;
q = &TREE_CHAIN (t);
}
--- gcc/testsuite/g++.dg/ext/attrib33.C.jj 2008-03-25 23:05:51.000000000 +0100
+++ gcc/testsuite/g++.dg/ext/attrib33.C 2008-03-25 23:06:15.000000000 +0100
@@ -0,0 +1,18 @@
+// PR c++/35546
+// { dg-do compile }
+
+template <int N>
+struct T
+{
+ void foo (char const * ...) __attribute__ ((format (printf,2,3)));
+};
+
+template struct T<3>;
+
+template <typename T>
+struct U
+{
+ typedef T __attribute__((mode (SI))) V;
+};
+
+U<int>::V v;

View File

@ -1,6 +1,6 @@
%define DATE 20080314
%define DATE 20080326
%define gcc_version 4.3.0
%define gcc_release 3
%define gcc_release 4
%define _unpackaged_files_terminate_build 0
%define multilib_64_archs sparc64 ppc64 s390x x86_64
%define include_gappletviewer 1
@ -140,6 +140,9 @@ Patch10: gcc43-rh330771.patch
Patch11: gcc43-rh341221.patch
Patch12: gcc43-cpp-pragma.patch
Patch13: gcc43-java-debug-iface-type.patch
Patch14: gcc43-libgomp-speedup.patch
Patch15: gcc43-pr35440.patch
Patch16: gcc43-pr35546.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@ -270,6 +273,7 @@ Fortran 95 dynamically linked programs.
%package -n libgomp
Summary: GCC OpenMP 2.5 shared support library
Group: System Environment/Libraries
Prereq: /sbin/install-info
%description -n libgomp
This package contains GCC shared support library which is needed
@ -436,6 +440,9 @@ which are required to run programs compiled with the GNAT.
%patch11 -p0 -b .rh341221~
%patch12 -p0 -b .cpp-pragma~
%patch13 -p0 -b .java-debug-iface-type~
%patch14 -p0 -b .libgomp-speedup~
%patch15 -p0 -b .pr35440~
%patch16 -p0 -b .pr35546~
tar xzf %{SOURCE4}
@ -1648,6 +1655,18 @@ fi
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
%changelog
* Wed Mar 26 2008 Jakub Jelinek <jakub@redhat.com> 4.3.0-4
- update from gcc-4_3-branch
- PRs c++/35332, c++/35548, debug/31510, fortran/33295, fortran/34813,
libfortran/35617, libfortran/35627, libgomp/35625, libstdc++/35256,
libstdc++/35637, middle-end/35593, middle-end/35609,
middle-end/35611, middle-end/35616, target/35504, testsuite/34168,
testsuite/35621
- backport libgomp speedups from gomp-3_0-branch (#437268)
- fix diagnostics with compound literals (PR c/35440)
- fix C++ handling of late template attributes (PR c++/35546)
- Prereq install-info in libgomp (#437523)
* Fri Mar 14 2008 Jakub Jelinek <jakub@redhat.com> 4.3.0-3
- update from gcc-4_3-branch
- PRs c++/33887, c++/35328, c++/35337, c++/35469, c/35438, c/35439,

View File

@ -1,2 +1,2 @@
e5fdf4d33dde9d798910296230192fbd gcc-4.3.0-20080314.tar.bz2
115ce1b73cce124647e910bd5da7fcff gcc-4.3.0-20080326.tar.bz2
92a70f9e56223b653bce0f58f90cf950 fastjar-0.95.tar.gz