rpms/gcc/devel gcc43-pr35751.patch, NONE, 1.1 gcc43-rh251682.patch, NONE, 1.1 .cvsignore, 1.230, 1.231 gcc43.spec, 1.27, 1.28 sources, 1.232, 1.233 gcc43-pr35546.patch, 1.1, NONE

Jakub Jelinek (jakub) fedora-extras-commits at redhat.com
Fri Apr 4 12:51:06 UTC 2008


Author: jakub

Update of /cvs/pkgs/rpms/gcc/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25160

Modified Files:
	.cvsignore gcc43.spec sources 
Added Files:
	gcc43-pr35751.patch gcc43-rh251682.patch 
Removed Files:
	gcc43-pr35546.patch 
Log Message:
4.3.0-6

gcc43-pr35751.patch:

--- NEW FILE gcc43-pr35751.patch ---
2008-04-03  Jakub Jelinek  <jakub at redhat.com>

	PR c/35751
	* c-decl.c (finish_decl): If extern or static var has variable
	size, set TREE_TYPE (decl) to error_mark_node.

	* decl.c (layout_var_decl): If extern or static var has variable
	size, set TREE_TYPE (decl) to error_mark_node.

	* gcc.dg/gomp/pr35751.c: New test.
	* g++.dg/gomp/pr35751.C: New test.

--- gcc/c-decl.c.jj	2008-04-03 09:41:42.000000000 +0200
+++ gcc/c-decl.c	2008-04-03 18:20:52.000000000 +0200
@@ -3481,7 +3481,10 @@ finish_decl (tree decl, tree init, tree 
 	  if (TREE_CODE (DECL_SIZE (decl)) == INTEGER_CST)
 	    constant_expression_warning (DECL_SIZE (decl));
 	  else
-	    error ("storage size of %q+D isn%'t constant", decl);
+	    {
+	      error ("storage size of %q+D isn%'t constant", decl);
+	      TREE_TYPE (decl) = error_mark_node;
+	    }
 	}
 
       if (TREE_USED (type))
--- gcc/cp/decl.c.jj	2008-03-31 23:54:40.000000000 +0200
+++ gcc/cp/decl.c	2008-04-03 18:30:19.000000000 +0200
@@ -4442,7 +4442,10 @@ layout_var_decl (tree decl)
       if (TREE_CODE (DECL_SIZE (decl)) == INTEGER_CST)
 	constant_expression_warning (DECL_SIZE (decl));
       else
-	error ("storage size of %qD isn't constant", decl);
+	{
+	  error ("storage size of %qD isn't constant", decl);
+	  TREE_TYPE (decl) = error_mark_node;
+	}
     }
 }
 
--- gcc/testsuite/gcc.dg/gomp/pr35751.c.jj	2008-04-03 18:26:12.000000000 +0200
+++ gcc/testsuite/gcc.dg/gomp/pr35751.c	2008-04-03 18:25:51.000000000 +0200
@@ -0,0 +1,34 @@
+/* PR c/35751 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+void
+foo (int i)
+{
+  extern int a[i];	/* { dg-error "must have no linkage|storage size of" } */
+  static int b[i];	/* { dg-error "storage size of" } */
+
+#pragma omp parallel
+  {
+    a[0] = 0;
+    b[0] = 0;
+  }
+
+#pragma omp parallel shared (a, b)
+  {
+    a[0] = 0;
+    b[0] = 0;
+  }
+
+#pragma omp parallel private (a, b)
+  {
+    a[0] = 0;
+    b[0] = 0;
+  }
+
+#pragma omp parallel firstprivate (a, b)
+  {
+    a[0] = 0;
+    b[0] = 0;
+  }
+}
--- gcc/testsuite/g++.dg/gomp/pr35751.C.jj	2008-04-03 18:32:13.000000000 +0200
+++ gcc/testsuite/g++.dg/gomp/pr35751.C	2008-04-03 18:32:32.000000000 +0200
@@ -0,0 +1,34 @@
+// PR c/35751
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+void
+foo (int i)
+{
+  extern int a[i];	// { dg-error "storage size of" }
+  static int b[i];	// { dg-error "storage size of" }
+
+#pragma omp parallel
+  {
+    a[0] = 0;
+    b[0] = 0;
+  }
+
+#pragma omp parallel shared (a, b)
+  {
+    a[0] = 0;
+    b[0] = 0;
+  }
+
+#pragma omp parallel private (a, b)
+  {
+    a[0] = 0;
+    b[0] = 0;
+  }
+
+#pragma omp parallel firstprivate (a, b)
+  {
+    a[0] = 0;
+    b[0] = 0;
+  }
+}

gcc43-rh251682.patch:

--- NEW FILE gcc43-rh251682.patch ---
2008-04-01  Jakub Jelinek  <jakub at redhat.com>

	PR pch/13675
	* files.c (struct _cpp_file): Remove pch field.
	(pch_open_file): Don't set file->pch, just file->pchname.
	(should_stack_file): After pfile->cb.read_pch call
	free pchname and clear pchname, don't close file->fd.
	Test file->pchname instead of file->pch.  Don't close fd after cb.
	(_cpp_stack_include): Test file->pchname instead of file->pch.

	* c-pch.c (c_common_read_pch): On error close (fd) resp. fclose (f).

--- libcpp/files.c.jj	2008-02-18 23:50:17.000000000 +0100
+++ libcpp/files.c	2008-03-31 15:59:01.000000000 +0200
@@ -106,9 +106,6 @@ struct _cpp_file
 
   /* If BUFFER above contains the true contents of the file.  */
   bool buffer_valid;
-
-  /* File is a PCH (on return from find_include_file).  */
-  bool pch;
 };
 
 /* A singly-linked list for all searches for a given file name, with
@@ -322,9 +319,7 @@ pch_open_file (cpp_reader *pfile, _cpp_f
 	    }
 	  closedir (pchdir);
 	}
-      if (valid)
-	file->pch = true;
-      else
+      if (!valid)
 	*invalid_pch = true;
     }
 
@@ -703,11 +698,12 @@ should_stack_file (cpp_reader *pfile, _c
     return false;
 
   /* Handle PCH files immediately; don't stack them.  */
-  if (file->pch)
+  if (file->pchname)
     {
       pfile->cb.read_pch (pfile, file->pchname, file->fd, file->path);
-      close (file->fd);
       file->fd = -1;
+      free ((void *) file->pchname);
+      file->pchname = NULL;
       return false;
     }
 
@@ -916,7 +912,7 @@ _cpp_stack_include (cpp_reader *pfile, c
      complicates LAST_SOURCE_LINE_LOCATION.  This does not apply if we
      found a PCH file (in which case linemap_add is not called) or we
      were included from the command-line.  */
-  if (! file->pch && file->err_no == 0 && type != IT_CMDLINE)
+  if (file->pchname == NULL && file->err_no == 0 && type != IT_CMDLINE)
     pfile->line_table->highest_location--;
 
   return _cpp_stack_file (pfile, file, type == IT_IMPORT);
--- gcc/c-pch.c.jj	2008-02-18 23:46:08.000000000 +0100
+++ gcc/c-pch.c	2008-03-31 15:56:00.000000000 +0200
@@ -372,6 +372,7 @@ c_common_read_pch (cpp_reader *pfile, co
   if (f == NULL)
     {
       cpp_errno (pfile, CPP_DL_ERROR, "calling fdopen");
+      close (fd);
       return;
     }
 
@@ -380,6 +381,7 @@ c_common_read_pch (cpp_reader *pfile, co
   if (fread (&h, sizeof (h), 1, f) != 1)
     {
       cpp_errno (pfile, CPP_DL_ERROR, "reading");
+      fclose (f);
       return;
     }
 
@@ -425,7 +427,10 @@ c_common_read_pch (cpp_reader *pfile, co
   gt_pch_restore (f);
 
   if (cpp_read_state (pfile, name, f, smd) != 0)
-    return;
+    {
+      fclose (f);
+      return;
+    }
 
   fclose (f);
 


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/devel/.cvsignore,v
retrieving revision 1.230
retrieving revision 1.231
diff -u -r1.230 -r1.231
--- .cvsignore	26 Mar 2008 19:56:57 -0000	1.230
+++ .cvsignore	4 Apr 2008 12:50:28 -0000	1.231
@@ -1,2 +1,2 @@
-gcc-4.3.0-20080326.tar.bz2
+gcc-4.3.0-20080404.tar.bz2
 fastjar-0.95.tar.gz


Index: gcc43.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/devel/gcc43.spec,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- gcc43.spec	27 Mar 2008 19:28:27 -0000	1.27
+++ gcc43.spec	4 Apr 2008 12:50:28 -0000	1.28
@@ -1,6 +1,6 @@
-%define DATE 20080326
+%define DATE 20080404
 %define gcc_version 4.3.0
-%define gcc_release 5
+%define gcc_release 6
 %define _unpackaged_files_terminate_build 0
 %define multilib_64_archs sparc64 ppc64 s390x x86_64
 %define include_gappletviewer 1
@@ -142,8 +142,9 @@
 Patch13: gcc43-java-debug-iface-type.patch
 Patch14: gcc43-libgomp-speedup.patch
 Patch15: gcc43-pr35440.patch
-Patch16: gcc43-pr35546.patch
-Patch17: gcc43-i386-libgomp.patch
+Patch16: gcc43-i386-libgomp.patch
+Patch17: gcc43-pr35751.patch
+Patch18: gcc43-rh251682.patch
 
 # On ARM EABI systems, we do want -gnueabi to be part of the
 # target triple.
@@ -443,8 +444,9 @@
 %patch13 -p0 -b .java-debug-iface-type~
 %patch14 -p0 -b .libgomp-speedup~
 %patch15 -p0 -b .pr35440~
-%patch16 -p0 -b .pr35546~
-%patch17 -p0 -b .i386-libgomp~
+%patch16 -p0 -b .i386-libgomp~
+%patch17 -p0 -b .pr35751~
+%patch18 -p0 -b .rh251682~
 
 tar xzf %{SOURCE4}
 
@@ -1660,6 +1662,17 @@
 %doc rpm.doc/changelogs/libmudflap/ChangeLog*
 
 %changelog
+* Fri Apr  4 2008 Jakub Jelinek <jakub at redhat.com> 4.3.0-6
+- update from gcc-4_3-branch
+  - PRs ada/33857, c++/35245, c++/35741, c/35738, fortran/35698,
+	fortran/35699, fortran/35702, fortran/35724, fortran/35740,
+	fortran/35786, libfortran/35699, libstdc++/35725, middle-end/35429,
+	middle-end/35705, middle-end/35818, target/31110, target/31232,
+	target/35657, tree-opt/35431
+- fix OpenMP ICE on invalid extern/static VLA (PR c/35751)
+- fix PCH failure if a precompiled header is included more than
+  once (#251682, PR pch/13675)
+
 * Thu Mar 27 2008 Jakub Jelinek <jakub at redhat.com> 4.3.0-5
 - fix libgomp when sync builtins aren't available
 - on i386 build libgomp and __cxa_guard_* as i486+,


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/devel/sources,v
retrieving revision 1.232
retrieving revision 1.233
diff -u -r1.232 -r1.233
--- sources	26 Mar 2008 19:56:57 -0000	1.232
+++ sources	4 Apr 2008 12:50:28 -0000	1.233
@@ -1,2 +1,2 @@
-115ce1b73cce124647e910bd5da7fcff  gcc-4.3.0-20080326.tar.bz2
+37e8ad834b055b24825a9c1fe383576e  gcc-4.3.0-20080404.tar.bz2
 92a70f9e56223b653bce0f58f90cf950  fastjar-0.95.tar.gz


--- gcc43-pr35546.patch DELETED ---




More information about the fedora-extras-commits mailing list