]> git.pld-linux.org Git - packages/gcc.git/commitdiff
- fix ICE with zero sized structs. auto/th/gcc-4_1_0-0_20050815T0803UTC_3
authorPaweł Sikora <pluto@pld-linux.org>
Tue, 16 Aug 2005 19:33:47 +0000 (19:33 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    gcc-pr23402.patch -> 1.1
    gcc.spec -> 1.356

gcc-pr23402.patch [new file with mode: 0644]
gcc.spec

diff --git a/gcc-pr23402.patch b/gcc-pr23402.patch
new file mode 100644 (file)
index 0000000..db7c3f3
--- /dev/null
@@ -0,0 +1,33 @@
+--- gcc-4.1-20050815T0803UTC/gcc/gimplify.c    2005-08-16 19:35:38.541525608 +0000
++++ gcc-4.1-20050815T0803UTC/gcc/gimplify.c    2005-08-16 19:36:46.005269560 +0000
+@@ -2552,6 +2552,17 @@ zero_sized_field_decl (tree fdecl)
+   return false;
+ }
++/* Return true if TYPE is zero sized.  */
++   
++static bool
++zero_sized_type (tree type)
++{
++  if (AGGREGATE_TYPE_P (type) && TYPE_SIZE (type)
++      && integer_zerop (TYPE_SIZE (type)))
++    return true;
++  return false;
++}
++
+ /* A subroutine of gimplify_init_constructor.  Generate individual
+    MODIFY_EXPRs for a CONSTRUCTOR.  OBJECT is the LHS against which the
+    assignments should happen.  ELTS is the CONSTRUCTOR_ELTS of the
+@@ -2964,6 +2975,12 @@ gimplify_modify_expr_rhs (tree *expr_p, 
+                         tree *post_p, bool want_value)
+ {
+   enum gimplify_status ret = GS_OK;
++  tree type = TREE_TYPE (*from_p);
++  if (zero_sized_type (type))
++    {
++      *expr_p = build_empty_stmt ();
++      return GS_ALL_DONE;
++    }
+   while (ret != GS_UNHANDLED)
+     switch (TREE_CODE (*from_p))
index 8b6d27393d571ba985f47f6fccf54320282634f2..bab8b173d8d0a13bec612c1b7cca76f84eb4e002 100644 (file)
--- a/gcc.spec
+++ b/gcc.spec
@@ -40,7 +40,7 @@ Summary(pt_BR):       Cole
 Name:          gcc
 Version:       4.1.0
 %define                _snap   20050815T0803UTC
-Release:       0.%{_snap}.2
+Release:       0.%{_snap}.3
 Epoch:         5
 License:       GPL v2+
 Group:         Development/Languages
@@ -62,6 +62,7 @@ Patch11:      %{name}-pr20297.patch
 Patch12:       %{name}-pr23128.patch
 Patch13:       %{name}-pr22533.patch
 Patch14:       %{name}-pr23386.patch
+Patch15:       %{name}-pr23402.patch
 URL:           http://gcc.gnu.org/
 BuildRequires: autoconf
 %{?with_tests:BuildRequires:   autogen}
@@ -728,6 +729,7 @@ Statyczne biblioteki Obiektowego C.
 %patch12 -p1
 %patch13 -p1
 %patch14 -p1
+%patch15 -p1
 
 # because we distribute modified version of gcc...
 perl -pi -e 's/(version.*)";/$1 (PLD Linux)";/' gcc/version.c
This page took 0.131812 seconds and 4 git commands to generate.