[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/gcc/devel gcc4-pr19450.patch, NONE, 1.1 gcc4-rh172652.patch, NONE, 1.1 .cvsignore, 1.114, 1.115 gcc4.spec, 1.84, 1.85 sources, 1.116, 1.117 gcc4-rh169765.patch, 1.1, NONE



Author: jakub

Update of /cvs/dist/rpms/gcc/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv9929

Modified Files:
	.cvsignore gcc4.spec sources 
Added Files:
	gcc4-pr19450.patch gcc4-rh172652.patch 
Removed Files:
	gcc4-rh169765.patch 
Log Message:
4.0.2-4


gcc4-pr19450.patch:
 cp/decl.c                         |   23 +++++++++++++++++++++++
 testsuite/g++.dg/tls/diag-3.C     |   10 ++++++++++
 testsuite/g++.dg/tls/diag-4.C     |    9 +++++++++
 testsuite/g++.dg/tls/static-1.C   |   28 ++++++++++++++++++++++++++++
 testsuite/g++.dg/tls/static-1a.cc |   18 ++++++++++++++++++
 5 files changed, 88 insertions(+)

--- NEW FILE gcc4-pr19450.patch ---
2005-11-08  Jakub Jelinek  <jakub redhat com>

	PR c++/19450
	* decl.c (redeclaration_error_message): Issue diagnostics about
	olddecl and newdecl disagreement on __thread property.
	(grokdeclarator): Set DECL_THREAD_LOCAL on class static variables.

	* g++.dg/tls/diag-3.C: New test.
	* g++.dg/tls/diag-4.C: New test.
	* g++.dg/tls/static-1.C: New test.
	* g++.dg/tls/static-1a.cc: New file.

--- gcc/cp/decl.c.jj	2005-11-04 10:11:36.000000000 +0100
+++ gcc/cp/decl.c	2005-11-08 14:44:05.000000000 +0100
@@ -1976,6 +1976,18 @@ redeclaration_error_message (tree newdec
 
       return NULL;
     }
+  else if (TREE_CODE (newdecl) == VAR_DECL
+	   && DECL_THREAD_LOCAL (newdecl) != DECL_THREAD_LOCAL (olddecl))
+    {
+      /* Only variables can be thread-local, and all declarations must
+	 agree on this property.  */
+      if (DECL_THREAD_LOCAL (newdecl))
+	return "thread-local declaration of %q#D follows "
+	       "non-thread-local declaration";
+      else
+	return "non-thread-local declaration of %q#D follows "
+	       "thread-local declaration";
+    }
   else if (toplevel_bindings_p () || DECL_NAMESPACE_SCOPE_P (newdecl))
     {
       /* Objects declared at top level:  */
@@ -8046,6 +8058,17 @@ grokdeclarator (const cp_declarator *dec
 		   is considered undefined until an out-of-class
 		   definition is provided.  */
 		DECL_EXTERNAL (decl) = 1;
+
+		if (thread_p)
+		  {
+		    if (targetm.have_tls)
+		      DECL_THREAD_LOCAL (decl) = 1;
+		    else
+		      /* A mere warning is sure to result in improper
+			 semantics at runtime.  Don't bother to allow this to
+			 compile.  */
+		      error ("thread-local storage not supported for this target");
+		  }
 	      }
 	    else
 	      {
--- gcc/testsuite/g++.dg/tls/diag-3.C.jj	2005-11-08 13:54:19.000000000 +0100
+++ gcc/testsuite/g++.dg/tls/diag-3.C	2005-11-08 14:21:17.000000000 +0100
@@ -0,0 +1,10 @@
+// Report invalid extern and __thread combinations.
+
+extern int j;		// { dg-error "previously declared here" }
+__thread int j;		// { dg-error "follows non-thread-local" }
+
+extern __thread int i;	// { dg-error "previously declared here" }
+int i;			// { dg-error "follows thread-local" }
+
+extern __thread int k;	// This is fine.
+__thread int k;
--- gcc/testsuite/g++.dg/tls/static-1a.cc.jj	2005-11-08 14:19:25.000000000 +0100
+++ gcc/testsuite/g++.dg/tls/static-1a.cc	2005-11-08 14:26:14.000000000 +0100
@@ -0,0 +1,18 @@
+// { dg-do run }
+// { dg-options "-O2" }
+// { dg-additional-sources "static-1a.cc" }
+
+struct A
+{
+  static __thread int i;
+};
+
+int
+test ()
+{
+  if (A::i != 8)
+    return 1;
+
+  A::i = 17;
+  return 0;
+}
--- gcc/testsuite/g++.dg/tls/static-1.C.jj	2005-11-08 14:19:17.000000000 +0100
+++ gcc/testsuite/g++.dg/tls/static-1.C	2005-11-08 14:21:41.000000000 +0100
@@ -0,0 +1,28 @@
+// { dg-do run }
+// { dg-options "-O2" }
+// { dg-additional-sources "static-1a.cc" }
+
+extern "C" void abort ();
+extern int test ();
+
+struct A
+{
+  static __thread int i;
+};
+
+__thread int A::i = 8;
+
+int
+main ()
+{
+  if (A::i != 8)
+    abort ();
+
+  if (test ())
+    abort ();
+
+  if (A::i != 17)
+    abort ();
+
+  return 0;
+}
--- gcc/testsuite/g++.dg/tls/diag-4.C.jj	2005-11-08 13:54:22.000000000 +0100
+++ gcc/testsuite/g++.dg/tls/diag-4.C	2005-11-08 13:55:24.000000000 +0100
@@ -0,0 +1,9 @@
+/* Invalid __thread specifiers.  */
+
+__thread typedef int g4;	/* { dg-error "multiple storage classes" } */
+
+void foo()
+{
+  __thread auto int l2;		/* { dg-error "multiple storage classes" } */
+  __thread register int l4;	/* { dg-error "multiple storage classes" } */
+}

gcc4-rh172652.patch:
 dwarf2out.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

--- NEW FILE gcc4-rh172652.patch ---
2005-11-08  Jakub Jelinek  <jakub redhat com>

	* dwarf2out.c (multiple_reg_loc_descriptor): Don't assume
	DBX_REGISTER_NUMBER being contiguous.

--- gcc/dwarf2out.c.jj	2005-11-04 10:13:05.000000000 +0100
+++ gcc/dwarf2out.c	2005-11-09 13:02:50.000000000 +0100
@@ -8411,7 +8411,8 @@ multiple_reg_loc_descriptor (rtx rtl, rt
   unsigned reg;
   dw_loc_descr_ref loc_result = NULL;
 
-  reg = dbx_reg_number (rtl);
+  reg = REGNO (rtl);
+  gcc_assert ((unsigned) DBX_REGISTER_NUMBER (reg) == dbx_reg_number (rtl));
   nregs = hard_regno_nregs[REGNO (rtl)][GET_MODE (rtl)];
 
   /* Simple, contiguous registers.  */
@@ -8424,7 +8425,7 @@ multiple_reg_loc_descriptor (rtx rtl, rt
 	{
 	  dw_loc_descr_ref t;
 
-	  t = one_reg_loc_descriptor (reg);
+	  t = one_reg_loc_descriptor (DBX_REGISTER_NUMBER (reg));
 	  add_loc_descr (&loc_result, t);
 	  add_loc_descr_op_piece (&loc_result, size);
 	  ++reg;


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/.cvsignore,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -r1.114 -r1.115
--- .cvsignore	7 Oct 2005 13:46:29 -0000	1.114
+++ .cvsignore	9 Nov 2005 12:21:57 -0000	1.115
@@ -1 +1 @@
-gcc-4.0.2-20051007.tar.bz2
+gcc-4.0.2-20051109.tar.bz2


Index: gcc4.spec
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc4.spec,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- gcc4.spec	7 Oct 2005 18:37:46 -0000	1.84
+++ gcc4.spec	9 Nov 2005 12:21:57 -0000	1.85
@@ -1,6 +1,6 @@
-%define DATE 20051007
+%define DATE 20051109
 %define gcc_version 4.0.2
-%define gcc_release 3
+%define gcc_release 4
 %define _unpackaged_files_terminate_build 0
 %define multilib_64_archs sparc64 ppc64 s390x x86_64
 %ifarch %{ix86} alpha ia64 x86_64 s390 sparc sparc64
@@ -107,7 +107,8 @@
 Patch25: gcc4-dwarf2-inline-details.patch
 Patch26: gcc4-dv.patch
 Patch27: gcc4-dwarf2-frame_base.patch
-Patch28: gcc4-rh169765.patch
+Patch28: gcc4-pr19450.patch
+Patch29: gcc4-rh172652.patch
 
 %define _gnu %{nil}
 %ifarch sparc
@@ -444,7 +445,8 @@
 %patch25 -p0 -b .dwarf2-inline-details~
 %patch26 -p0 -b .dv~
 %patch27 -p0 -b .dwarf2-frame_base~
-%patch28 -p0 -b .rh169765~
+%patch28 -p0 -b .pr19450~
+%patch29 -p0 -b .rh172652~
 
 perl -pi -e 's/4\.0\.3/4.0.2/' gcc/version.c
 perl -pi -e 's/"%{gcc_version}"/"%{gcc_version} \(release\)"/' gcc/version.c
@@ -649,7 +651,6 @@
   's~href="l(ibstdc|atest)~href="http://gcc.gnu.org/onlinedocs/libstdc++/l\1~' \
   libstdc++-v3/docs/html/documentation.html
 ln -sf documentation.html libstdc++-v3/docs/html/index.html
-find libstdc++-v3/docs/html -name CVS | xargs rm -rf
 
 cd obj-%{gcc_target_platform}
 
@@ -1473,6 +1474,43 @@
 %endif
 
 %changelog
+* Wed Nov  9 2005 Jakub Jelinek  <jakub redhat com> 4.0.2-4
+- update from SVN (-r105083:106678)
+  - PRs ada/21937, ada/22328, ada/22381, ada/22383, ada/22418, ada/22419,
+	ada/22420, bootstrap/18939, c++/17796, c++/17964, c++/19253,
+	c++/19964, c++/19989, c++/20721, c++/21089, c++/21117, c++/21347,
+	c++/21353, c++/21369, c++/21383, c++/21592, c++/21627, c++/21908,
+	c++/22147, c++/22153, c++/22180, c++/22293, c++/22352, c++/22405,
+	c++/22434, c++/22464, c++/22551, c++/22603, c++/22604, c++/22618,
+	c++/23118, c++/23229, c++/23293, c++/23307, c++/23426, c++/23437,
+	c++/23440, c++/23694, c++/23730, c++/23797, c++/23959, c++/23984,
+	c++/24052, c++/24139, c++/24260, c++/24275, c++/24277, c++/24302,
+	c++/24386, c++/24389, c++/24560, c++/24569, c++/24582, c/23103,
+	c/24101, c/24329, c/24599, driver/22544, driver/24473, fortran/14994,
+	fortran/15975, fortran/16404, fortran/17737, fortran/18022,
+	fortran/18082, fortran/18157, fortran/18452, fortran/18737,
+	fortran/19929, fortran/20786, fortran/20835, fortran/20837,
+	fortran/20838, fortran/20840, fortran/20847, fortran/20849,
+	fortran/20853, fortran/20856, fortran/20866, fortran/20890,
+	fortran/20899, fortran/20900, fortran/20901, fortran/20902,
+	fortran/21459, fortran/21565, fortran/21625, fortran/22273,
+	fortran/22290, fortran/23446, fortran/23635, fortran/23843,
+	fortran/24092, fortran/24158, fortran/24207, fortran/24245,
+	fortran/24416, fortran/24426, fortran/24440, fortran/24534,
+	fortran/24545, fortran/24636, java/13788, java/20993, java/21540,
+	java/23617, java/23620, java/24251, libfortran/22298, libgcj/14358,
+	libgcj/23763, libgcj/24552, libstdc++/13583, libstdc++/18174,
+	libstdc++/23953, libstdc++/24244, libstdc++/24450, libstdc++/24559,
+	libstdc++/24595, middle-end/23155, middle-end/23199,
+	middle-end/23522, middle-end/24135, middle-end/24362,
+	preprocessor/15220, preprocessor/21250, preprocessor/22042,
+	preprocessor/24202, rtl-opt/23324, rtl-optimization/23567,
+	rtl-optimization/23585, rtl-optimization/24683, target/19340,
+	target/19672, target/21518, target/22432, target/23644, target/24178,
+	target/24284, target/24315, target/24428, target/24465, treelang/23072
+- fix multiple_reg_loc_descriptor on i?86 (#172652)
+- fix __thread on C++ class static members (PR c++/19450)
+
 * Fri Oct  7 2005 Jakub Jelinek  <jakub redhat com> 4.0.2-3
 - update from CVS
   - PRs fortran/18568, debug/24070, middle-end/15855, target/22585,


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/sources,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -r1.116 -r1.117
--- sources	7 Oct 2005 13:46:29 -0000	1.116
+++ sources	9 Nov 2005 12:21:57 -0000	1.117
@@ -1 +1 @@
-b18786f4abe880300e2af1e0629b03c4  gcc-4.0.2-20051007.tar.bz2
+0d012dfc0185d34037ce36e490072a71  gcc-4.0.2-20051109.tar.bz2


--- gcc4-rh169765.patch DELETED ---


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]