diff --git a/.cvsignore b/.cvsignore index 2accf17..0b97251 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -gcc-4.3.1-20080609.tar.bz2 +gcc-4.3.1-20080612.tar.bz2 fastjar-0.95.tar.gz diff --git a/gcc43-pr36507.patch b/gcc43-pr36507.patch new file mode 100644 index 0000000..fe28bb1 --- /dev/null +++ b/gcc43-pr36507.patch @@ -0,0 +1,138 @@ +2008-06-12 Jakub Jelinek + + PR c/36507 + * c-decl.c (merge_decls): Don't clear DECL_EXTERNAL for + nested inline functions. + (start_decl, start_function): Don't invert DECL_EXTERNAL + for nested inline functions. + + * gcc.dg/inline-28.c: New test. + * gcc.dg/inline-29.c: New test. + * gcc.dg/inline-30.c: New test. + +--- gcc/c-decl.c.jj 2008-05-08 01:06:20.000000000 +0200 ++++ gcc/c-decl.c 2008-06-12 17:40:19.000000000 +0200 +@@ -1763,7 +1763,9 @@ merge_decls (tree newdecl, tree olddecl, + || !DECL_DECLARED_INLINE_P (olddecl) + || !DECL_EXTERNAL (olddecl)) + && DECL_EXTERNAL (newdecl) +- && !lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (newdecl))) ++ && !lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (newdecl)) ++ && (DECL_CONTEXT (newdecl) == NULL_TREE ++ || TREE_CODE (DECL_CONTEXT (newdecl)) != FUNCTION_DECL)) + DECL_EXTERNAL (newdecl) = 0; + + if (DECL_EXTERNAL (newdecl)) +@@ -3264,7 +3266,8 @@ start_decl (struct c_declarator *declara + if (declspecs->inline_p + && !flag_gnu89_inline + && TREE_CODE (decl) == FUNCTION_DECL +- && lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (decl))) ++ && (lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (decl)) ++ || current_function_decl)) + { + if (declspecs->storage_class == csc_auto && current_scope != file_scope) + ; +@@ -6094,7 +6097,8 @@ start_function (struct c_declspecs *decl + if (declspecs->inline_p + && !flag_gnu89_inline + && TREE_CODE (decl1) == FUNCTION_DECL +- && lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (decl1))) ++ && (lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (decl1)) ++ || current_function_decl)) + { + if (declspecs->storage_class != csc_static) + DECL_EXTERNAL (decl1) = !DECL_EXTERNAL (decl1); +--- gcc/testsuite/gcc.dg/inline-28.c.jj 2008-06-12 17:19:10.000000000 +0200 ++++ gcc/testsuite/gcc.dg/inline-28.c 2008-06-12 18:21:03.000000000 +0200 +@@ -0,0 +1,28 @@ ++/* PR c/36507 */ ++/* { dg-do run } */ ++/* { dg-options "-O0 -std=gnu89" } */ ++ ++int ++main (void) ++{ ++ int i = 2; ++ auto inline int f1 (void) ++ { ++ return i; ++ } ++ inline int f2 (void) ++ { ++ return i; ++ } ++ auto inline int f3 (void); ++ auto inline int f3 (void) ++ { ++ return i; ++ } ++ auto inline int f4 (void); ++ inline int f4 (void) ++ { ++ return i; ++ } ++ return f1 () + f2 () + f3 () + f4 () - 8; ++} +--- gcc/testsuite/gcc.dg/inline-29.c.jj 2008-06-12 17:19:10.000000000 +0200 ++++ gcc/testsuite/gcc.dg/inline-29.c 2008-06-12 18:21:08.000000000 +0200 +@@ -0,0 +1,28 @@ ++/* PR c/36507 */ ++/* { dg-do run } */ ++/* { dg-options "-O0 -std=gnu99" } */ ++ ++int ++main (void) ++{ ++ int i = 2; ++ auto inline int f1 (void) ++ { ++ return i; ++ } ++ inline int f2 (void) ++ { ++ return i; ++ } ++ auto inline int f3 (void); ++ auto inline int f3 (void) ++ { ++ return i; ++ } ++ auto inline int f4 (void); ++ inline int f4 (void) ++ { ++ return i; ++ } ++ return f1 () + f2 () + f3 () + f4 () - 8; ++} +--- gcc/testsuite/gcc.dg/inline-30.c.jj 2008-06-12 17:19:10.000000000 +0200 ++++ gcc/testsuite/gcc.dg/inline-30.c 2008-06-12 18:21:13.000000000 +0200 +@@ -0,0 +1,28 @@ ++/* PR c/36507 */ ++/* { dg-do run } */ ++/* { dg-options "-O0 -std=gnu99 -fgnu89-inline" } */ ++ ++int ++main (void) ++{ ++ int i = 2; ++ auto inline int f1 (void) ++ { ++ return i; ++ } ++ inline int f2 (void) ++ { ++ return i; ++ } ++ auto inline int f3 (void); ++ auto inline int f3 (void) ++ { ++ return i; ++ } ++ auto inline int f4 (void); ++ inline int f4 (void) ++ { ++ return i; ++ } ++ return f1 () + f2 () + f3 () + f4 () - 8; ++} diff --git a/gcc43.spec b/gcc43.spec index 546f712..27a0b02 100644 --- a/gcc43.spec +++ b/gcc43.spec @@ -1,6 +1,6 @@ -%define DATE 20080609 +%define DATE 20080612 %define gcc_version 4.3.1 -%define gcc_release 1 +%define gcc_release 2 %define _unpackaged_files_terminate_build 0 %define multilib_64_archs sparc64 ppc64 s390x x86_64 %define include_gappletviewer 1 @@ -143,6 +143,7 @@ Patch13: gcc43-i386-libgomp.patch Patch14: gcc43-rh251682.patch Patch15: gcc43-sparc-config-detection.patch Patch16: gcc43-libgomp-omp_h-multilib.patch +Patch17: gcc43-pr36507.patch # On ARM EABI systems, we do want -gnueabi to be part of the # target triple. @@ -443,6 +444,7 @@ which are required to run programs compiled with the GNAT. %patch14 -p0 -b .rh251682~ %patch15 -p0 -b .sparc-config-detection~ %patch16 -p0 -b .libgomp-omp_h-multilib~ +%patch17 -p0 -b .pr36507~ tar xzf %{SOURCE4} @@ -1664,7 +1666,16 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog -* Mon Jun 9 2008 Jakub Jelinek 4.3.1-1 +* Thu Jun 12 2008 Jakub Jelinek 4.3.1-2 +- update from gcc-4_3-branch + - PRs c++/36408, middle-end/35336, middle-end/36506, testsuite/36443, + tree-optimization/36474 +- OpenMP 3.0 bugfixes from trunk + - fix a thinko in task dispatching on barriers + - PRs libgomp/36469, libgomp/36471 +- fix nested inline functions in -std=gnu99 mode (#450967, PR c/36507) + +* Mon Jun 9 2008 Jakub Jelinek 4.3.1-1 - update from gcc-4_3-branch - 4.3.1 release - PRs ada/24880, ada/26635, bootstrap/35169, bootstrap/36452, c++/35578, diff --git a/sources b/sources index 03648a8..37b8327 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -91abbb3cb390ca0441acec2bb0908eab gcc-4.3.1-20080609.tar.bz2 +6ebb8dce59c6e2cb49992fa96fef66ee gcc-4.3.1-20080612.tar.bz2 92a70f9e56223b653bce0f58f90cf950 fastjar-0.95.tar.gz