rpms/gcc/devel gcc4-fortran-bzbn.patch, NONE, 1.1 gcc4-fortran-data-range.patch, NONE, 1.1 gcc4-fortran-inf.patch, NONE, 1.1 gcc4-pr20606.patch, NONE, 1.1 gcc4-pr21828.patch, NONE, 1.1 gcc4-rh163058.patch, NONE, 1.1 gcc4.spec, 1.58, 1.59

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Jul 20 16:48:39 UTC 2005


Author: jakub

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

Modified Files:
	gcc4.spec 
Added Files:
	gcc4-fortran-bzbn.patch gcc4-fortran-data-range.patch 
	gcc4-fortran-inf.patch gcc4-pr20606.patch gcc4-pr21828.patch 
	gcc4-rh163058.patch 
Log Message:
4.0.1-4


gcc4-fortran-bzbn.patch:
 gcc/testsuite/gfortran.dg/fmt_read_bz_bn.f90 |   14 +++++++
 libgfortran/io/read.c                        |   48 +++++++++++++++++++--------
 libgfortran/io/unit.c                        |    6 +--
 3 files changed, 51 insertions(+), 17 deletions(-)

--- NEW FILE gcc4-fortran-bzbn.patch ---
2005-07-19  Jerry DeLisle  <jvdelisle at verizon.net>

	* io/read.c (read_f): Fix reading of trailing blanks in
	exponents related to BZ and BN format specifier logic.
	* io/unit.c (init_units): Change default setting of u->flags.blank
	to BLANK_UNSPECIFIED for stdin, stdout, and stderr.

--- libgfortran/io/read.c.jj	2005-07-14 19:52:29.000000000 +0200
+++ libgfortran/io/read.c	2005-07-20 17:40:20.000000000 +0200
@@ -651,24 +651,46 @@ read_f (fnode * f, char *dest, int lengt
   p++;
   w--;
 
-  while (w > 0)
+  if (g.blank_status == BLANK_UNSPECIFIED) /* Normal processing of exponent */
     {
-      if (*p == ' ')
+      while (w > 0 && isdigit (*p))
         {
-          if (g.blank_status == BLANK_ZERO) *p = '0';
-          if (g.blank_status == BLANK_NULL)
+          exponent = 10 * exponent + *p - '0';
+          p++;
+          w--;
+        }
+        
+      /* Only allow trailing blanks */
+
+      while (w > 0)
+        {
+          if (*p != ' ')
+  	  goto bad_float;
+          p++;
+          w--;
+        }
+    }    
+  else  /* BZ or BN status is enabled */
+    {
+      while (w > 0)
+        {
+          if (*p == ' ')
             {
-              p++;
-              w--;
-              continue;
+              if (g.blank_status == BLANK_ZERO) *p = '0';
+              if (g.blank_status == BLANK_NULL)
+                {
+                  p++;
+                  w--;
+                  continue;
+                }
             }
+          else if (!isdigit (*p))
+            goto bad_float;
+
+          exponent = 10 * exponent + *p - '0';
+          p++;
+          w--;
         }
-      if (!isdigit (*p))
-        goto bad_float;
-        
-      exponent = 10 * exponent + *p - '0';
-      p++;
-      w--;
     }
 
   exponent = exponent * exponent_sign;
--- libgfortran/io/unit.c.jj	2005-07-14 19:52:29.000000000 +0200
+++ libgfortran/io/unit.c	2005-07-20 17:40:20.000000000 +0200
@@ -304,7 +304,7 @@ init_units (void)
       u->flags.access = ACCESS_SEQUENTIAL;
       u->flags.form = FORM_FORMATTED;
       u->flags.status = STATUS_OLD;
-      u->flags.blank = BLANK_ZERO;
+      u->flags.blank = BLANK_UNSPECIFIED;
       u->flags.position = POSITION_ASIS;
 
       u->recl = options.default_recl;
@@ -326,7 +326,7 @@ init_units (void)
       u->flags.access = ACCESS_SEQUENTIAL;
       u->flags.form = FORM_FORMATTED;
       u->flags.status = STATUS_OLD;
-      u->flags.blank = BLANK_ZERO;
+      u->flags.blank = BLANK_UNSPECIFIED;
       u->flags.position = POSITION_ASIS;
 
       u->recl = options.default_recl;
@@ -348,7 +348,7 @@ init_units (void)
       u->flags.access = ACCESS_SEQUENTIAL;
       u->flags.form = FORM_FORMATTED;
       u->flags.status = STATUS_OLD;
-      u->flags.blank = BLANK_ZERO;
+      u->flags.blank = BLANK_UNSPECIFIED;
       u->flags.position = POSITION_ASIS;
 
       u->recl = options.default_recl;
--- gcc/testsuite/gfortran.dg/fmt_read_bz_bn.f90.jj	2005-07-14 19:58:42.000000000 +0200
+++ gcc/testsuite/gfortran.dg/fmt_read_bz_bn.f90	2005-07-20 17:41:19.000000000 +0200
@@ -6,12 +6,15 @@ program test_bn
         
 integer I1(2,2), I2(2,2,2)
 real A1(5)
+real*8 A2(0:3)
 character*80 :: IDATA1="111 2 2 3 3. 3E-1  44 5 5 6 . 67 . 78 8. 8E-1"
 character*80 :: IDATA2="2345 1 34512 45123 51234 2345 1 34512 45123 5"
+character*80 :: IDATA3="-8.0D0  1.0D-4  0.50D0  0.250D0"
 character*80 :: ODATA=""
 character*80 :: CORRECT1=" 1110 2020 .30303E-07   44   55   6.6 70.07 .888E+01"
 character*80 :: CORRECT2="23450 10345. 12.45 1235 1234 2345  1345. 12.45 1235"
-
+character*80 :: CORRECT3="   -0.8000000000D+01    0.1000000000D-03&
+    0.5000000000D+00    0.2500000000D+00"
 READ(IDATA1, 10) I1(1,2), IVI, A1(3), JVI, KVI, A1(2), AVS, A1(1)
 10 FORMAT (BZ,(2I4, E10.1, BN, 2I4, F5.2, BZ, F5.2, BN, E10.1))
 
@@ -28,5 +31,14 @@ WRITE(ODATA, 40) I2(1,2,1), A1(3), AVS, 
 40 FORMAT (I5, F7.0, BZ, 1X, F5.2, 2(1X,I4),I5, F7.0, BZ, 1X, F5.2, 1X, I4)
 
 if (ODATA /= CORRECT2) call abort
+ODATA=""
+
+READ(IDATA3, 50) A2
+50 FORMAT (4D8.0)
+
+WRITE(ODATA,60) A2
+60 FORMAT (4D20.10)
+
+if (ODATA /= CORRECT3) call abort
 
 end program test_bn

gcc4-fortran-data-range.patch:
 fortran/data.c                                        |   15 ++++++++++-----
 testsuite/gfortran.fortran-torture/execute/data_4.f90 |    6 ++++++
 2 files changed, 16 insertions(+), 5 deletions(-)

--- NEW FILE gcc4-fortran-data-range.patch ---
2005-07-19  Jakub Jelinek  <jakub at redhat.com>

	PR fortran/20063
	* data.c (gfc_assign_data_value_range): Call
	create_character_initializer if last_ts is a character type.

	* gfortran.fortran-torture/execute/data_4.f90: New test.

--- gcc/fortran/data.c.jj	2005-07-19 17:39:28.000000000 +0200
+++ gcc/fortran/data.c	2005-07-19 17:39:48.000000000 +0200
@@ -459,12 +459,17 @@ gfc_assign_data_value_range (gfc_expr * 
       last_con = con;
     }
 
-  /* We should never be overwriting an existing initializer.  */
-  gcc_assert (!init);
+  if (last_ts->type == BT_CHARACTER)
+    expr = create_character_intializer (init, last_ts, NULL, rvalue);
+  else
+    {
+      /* We should never be overwriting an existing initializer.  */
+      gcc_assert (!init);
 
-  expr = gfc_copy_expr (rvalue);
-  if (!gfc_compare_types (&lvalue->ts, &expr->ts))
-    gfc_convert_type (expr, &lvalue->ts, 0);
+      expr = gfc_copy_expr (rvalue);
+      if (!gfc_compare_types (&lvalue->ts, &expr->ts))
+	gfc_convert_type (expr, &lvalue->ts, 0);
+    }
 
   if (last_con == NULL)
     symbol->value = expr;
--- gcc/testsuite/gfortran.fortran-torture/execute/data_4.f90.jj	2005-07-19 17:48:25.000000000 +0200
+++ gcc/testsuite/gfortran.fortran-torture/execute/data_4.f90	2005-07-19 15:10:45.000000000 +0200
@@ -0,0 +1,6 @@
+	CHARACTER*4 A(3),B(3),C(3)
+	DATA A /'A',"A",'A'/
+	DATA B /3*'A'/
+	DATA C /'A', 2*'A'/
+	IF (ANY(A.NE.B).OR.ANY(A.NE.C)) CALL ABORT
+	END

gcc4-fortran-inf.patch:
 gcc/testsuite/gfortran.fortran-torture/execute/nan_inf_fmt.f90 |    2 -
 libgfortran/io/write.c                                         |   11 ++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

--- NEW FILE gcc4-fortran-inf.patch ---
2005-07-19  Jerry DeLisle  <jvdelisle at verizon.net>

	* io/write.c (write_float): Change output for negative infinity
	with field width of 3 to '***' per F95 and F2003 Standards.

--- libgfortran/io/write.c.jj	2005-07-14 19:52:29.000000000 +0200
+++ libgfortran/io/write.c	2005-07-20 17:32:05.000000000 +0200
@@ -714,8 +714,15 @@ write_float (fnode *f, const char *sourc
 	  if (res != 0)
 	    {
 	      if (signbit(n))   
-		fin = '-';
-	      else
+		{
+		  if (nb == 3)
+		    {
+		      memset (p, '*',nb);
+		      return;
+		    }
+		  fin = '-';
+		}
+  	      else
 		fin = '+';
 
 	      if (nb > 7)
--- gcc/testsuite/gfortran.fortran-torture/execute/nan_inf_fmt.f90.jj	2004-06-12 14:50:54.000000000 +0200
+++ gcc/testsuite/gfortran.fortran-torture/execute/nan_inf_fmt.f90	2005-07-20 17:32:41.000000000 +0200
@@ -27,7 +27,7 @@
        write(l,fmt=fmt)pos_inf
        if (l.ne.'Inf') call abort
        write(l,fmt=fmt)neg_inf
-       if (l.ne.'Inf') call abort
+       if (l.ne.'***') call abort
        write(l,fmt=fmt)nan
        if (l.ne.'NaN') call abort
 

gcc4-pr20606.patch:
 except.c |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

--- NEW FILE gcc4-pr20606.patch ---
2005-07-14  Andrew Haley  <aph at redhat.com>

	* except.c (expand_end_java_handler): Insert an empty ASM_EXPR at
	the start of each catch block.
	
--- gcc/java/except.c.jj	2005-05-04 00:56:46.000000000 +0200
+++ gcc/java/except.c	2005-07-19 18:11:39.000000000 +0200
@@ -496,11 +496,21 @@ expand_end_java_handler (struct eh_range
       type = prepare_eh_table_type (type);
 
       {
-	tree catch_expr = build2 (CATCH_EXPR, void_type_node, type,
-				  build1 (GOTO_EXPR, void_type_node,
-					  TREE_VALUE (handler)));
-	tree try_catch_expr = build2 (TRY_CATCH_EXPR, void_type_node,
-				      *get_stmts (), catch_expr);	
+	tree goto_expr = build1 (GOTO_EXPR, void_type_node,
+				 TREE_VALUE (handler));
+	/* Build an asm to prevent gcc from attempting to merge this
+	   handler with the next basic block; this is a workaround for
+	   a bug in cfgbuild.c.  */
+	tree asm_expr = build (ASM_EXPR, void_type_node,
+			       build_string (0, ""),
+			       NULL_TREE, NULL_TREE, NULL_TREE);
+	tree compound = build2 (COMPOUND_EXPR, void_type_node,
+				asm_expr, goto_expr);
+	tree try_catch_expr 
+	  = build2 (TRY_CATCH_EXPR, void_type_node,
+		    *get_stmts (), 
+		    build2 (CATCH_EXPR, void_type_node, type, 
+			    compound));
 	*get_stmts () = try_catch_expr;
       }
     }

gcc4-pr21828.patch:
 testsuite/gcc.dg/debug/dwarf2/static-var1.c |   14 ++++++++++++++
 toplev.c                                    |    1 +
 2 files changed, 15 insertions(+)

--- NEW FILE gcc4-pr21828.patch ---
2005-07-20  Jakub Jelinek  <jakub at redhat.com>

	PR debug/21828
	* toplev.c (check_global_declarations): Don't set DECL_IGNORED_P
	on still unemitted variables with static storage duration if
	cgraph_optimize has not been called yet in unit at a time mode.

	* gcc.dg/debug/dwarf2/static-var1.c: New test.

--- gcc/toplev.c.jj	2005-07-19 19:06:07.000000000 +0200
+++ gcc/toplev.c	2005-07-20 14:03:08.000000000 +0200
@@ -806,6 +806,7 @@ check_global_declarations (tree *vec, in
 	 static storage, but not defined.  */
       if (TREE_CODE (decl) == VAR_DECL
 	  && TREE_STATIC (decl)
+	  && (cgraph_global_info_ready || !flag_unit_at_a_time)
 	  && !TREE_ASM_WRITTEN (decl))
 	DECL_IGNORED_P (decl) = 1;
  
--- gcc/testsuite/gcc.dg/debug/dwarf2/static-var1.c.jj	2005-07-20 13:59:26.000000000 +0200
+++ gcc/testsuite/gcc.dg/debug/dwarf2/static-var1.c	2005-07-20 14:00:23.000000000 +0200
@@ -0,0 +1,14 @@
+/* Check that debug info is emitted for static_var.  */
+/* { dg-do compile */
+/* { dg-options "-O2 -gdwarf-2 -dA" } */
+/* { dg-final { scan-assembler "DW_TAG_variable" } } */
+
+static int static_var;
+
+int
+main (void)
+{
+  static_var += 3;
+  static_var *= 5;
+  return 0;
+}

gcc4-rh163058.patch:
 calls.c                                      |   32 +++++++++++++++
 testsuite/gcc.c-torture/execute/20050713-1.c |   56 +++++++++++++++++++++++++++
 2 files changed, 88 insertions(+)

--- NEW FILE gcc4-rh163058.patch ---
2005-07-13  Jakub Jelinek  <jakub at redhat.com>

	* calls.c (store_one_arg): Check for sibling call MEM arguments
	from already clobbered incoming argument area.

	* gcc.c-torture/execute/20050713-1.c: New test.

--- gcc/calls.c.jj	2005-07-02 02:27:09.000000000 +0200
+++ gcc/calls.c	2005-07-13 20:05:36.000000000 +0200
@@ -4062,6 +4062,38 @@ store_one_arg (struct arg_data *arg, rtx
 	stack_arg_under_construction--;
     }
 
+  /* Check for overlap with already clobbered argument area.  */
+  if ((flags & ECF_SIBCALL) && MEM_P (arg->value))
+    {
+      int i = -1;
+      unsigned int k;
+      rtx x = arg->value;
+
+      if (XEXP (x, 0) == current_function_internal_arg_pointer)
+	i = 0;
+      else if (GET_CODE (XEXP (x, 0)) == PLUS
+	       && XEXP (XEXP (x, 0), 0) ==
+		  current_function_internal_arg_pointer
+	       && GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT)
+	i = INTVAL (XEXP (XEXP (x, 0), 1));
+      else
+	i = -1;
+
+      if (i >= 0)
+	{
+#ifdef ARGS_GROW_DOWNWARD
+	  i = -i - arg->locate.size.constant;
+#endif
+	  for (k = 0; k < arg->locate.size.constant; k++)
+	    if (i + k < stored_args_map->n_bits
+		&& TEST_BIT (stored_args_map, i + k))
+	      {
+		sibcall_failure = 1;
+		break;
+	      }
+	}
+    }
+
   /* Don't allow anything left on stack from computation
      of argument to alloca.  */
   if (flags & ECF_MAY_BE_ALLOCA)
--- gcc/testsuite/gcc.c-torture/execute/20050713-1.c.jj	2005-07-13 20:23:42.000000000 +0200
+++ gcc/testsuite/gcc.c-torture/execute/20050713-1.c	2005-07-13 20:23:27.000000000 +0200
@@ -0,0 +1,56 @@
+/* Test that sibling call is not used if there is an argument overlap.  */
+
+extern void abort (void);
+
+struct S
+{
+  int a, b, c;
+};
+
+int
+foo2 (struct S x, struct S y)
+{
+  if (x.a != 3 || x.b != 4 || x.c != 5)
+    abort ();
+  if (y.a != 6 || y.b != 7 || y.c != 8)
+    abort ();
+  return 0;
+}
+
+int
+foo3 (struct S x, struct S y, struct S z)
+{
+  foo2 (x, y);
+  if (z.a != 9 || z.b != 10 || z.c != 11)
+    abort ();
+  return 0;
+}
+
+int
+bar2 (struct S x, struct S y)
+{
+  return foo2 (y, x);
+}
+
+int
+bar3 (struct S x, struct S y, struct S z)
+{
+  return foo3 (y, x, z);
+}
+
+int
+baz3 (struct S x, struct S y, struct S z)
+{
+  return foo3 (y, z, x);
+}
+
+int
+main (void)
+{
+  struct S a = { 3, 4, 5 }, b = { 6, 7, 8 }, c = { 9, 10, 11 };
+
+  bar2 (b, a);
+  bar3 (b, a, c);
+  baz3 (c, a, b);
+  return 0;
+}


Index: gcc4.spec
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc4.spec,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- gcc4.spec	14 Jul 2005 19:10:32 -0000	1.58
+++ gcc4.spec	20 Jul 2005 16:48:35 -0000	1.59
@@ -1,6 +1,6 @@
-%define DATE 20050714
+%define DATE 20050720
 %define gcc_version 4.0.1
-%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
@@ -91,6 +91,12 @@
 Patch18: gcc4-ia64-stack-protector.patch
 Patch19: gcc4-s390-stack-protector.patch
 Patch20: gcc4-pr22052.patch
+Patch21: gcc4-fortran-bzbn.patch
+Patch22: gcc4-fortran-inf.patch
+Patch23: gcc4-fortran-data-range.patch
+Patch24: gcc4-pr20606.patch
+Patch25: gcc4-pr21828.patch
+Patch26: gcc4-rh163058.patch
 
 %define _gnu %{nil}
 %ifarch sparc
@@ -420,6 +426,12 @@
 %patch18 -p0 -b .ia64-stack-protector~
 %patch19 -p0 -b .s390-stack-protector~
 %patch20 -p0 -b .pr22052~
+%patch21 -p0 -b .fortran-bzbn~
+%patch22 -p0 -b .fortran-inf~
+%patch23 -p0 -b .fortran-data-range~
+%patch24 -p0 -b .pr20606~
+%patch25 -p0 -b .pr21828~
+%patch26 -p0 -b .rh163058~
 
 perl -pi -e 's/4\.0\.2/4.0.1/' gcc/version.c
 perl -pi -e 's/"%{gcc_version}"/"%{gcc_version} \(release\)"/' gcc/version.c
@@ -1444,6 +1456,26 @@
 %endif
 
 %changelog
+* Wed Jul 20 2005 Jakub Jelinek  <jakub at redhat.com> 4.0.1-4
+- update from CVS
+  - PRs c++/22132, c++/22139, c++/22263, c/22421, fortran/13257,
+	fortran/20842, fortran/21034, libfortran/18857, libfortran/21333,
+	libfortran/21480, libfortran/21593, libfortran/21594,
+	libfortran/21926, libfortran/22142, libfortran/22144,
+	libstdc++/21193, middle-end/22057, target/21721, testsuite/21969
+  - avoid discarding volatile casts (Richard Henderson, #162274,
+    PR tree-opt/22278)
+  - fix -frepo (Mark Mitchell, #163271, PR c++/22204)
+- ensure debug info for C static file-scope vars is emitted with
+  -g -O[23] (PR debug/21828)
+- fix fortran handling of repeated character literals in DATA (#163394,
+  PR fortran/20063)
+- avoid sibling calls if structure arguments passed by value overlap
+  (#163058)
+- work around PR middle-end/20606 (Andrew Haley)
+- fix fortran output of -Infinity for length 3 (Jerry DeLisle)
+- fix fortran handling of trailing blanks in exponents (Jerry DeLisle)
+
 * Thu Jul 14 2005 Jakub Jelinek  <jakub at redhat.com> 4.0.1-3
 - update from CVS
   - PRs bootstrap/21704, c++/10611, c++/20563, c++/20637, c++/20678,




More information about the fedora-cvs-commits mailing list