Fix 19990525-0.f

craig@jcb-sc.com craig@jcb-sc.com
Tue May 25 16:28:00 GMT 1999


Committed to mainline and, without the new test case, to the branch.

        tq vm, (burley)


egcs/gcc/f/ChangeLog:
Tue May 25 17:48:34 1999  Craig Burley  <craig@jcb-sc.com>

	Fix 19990525-0.f:
	* com.c (ffecom_arg_ptr_to_expr): Strip off parens around
	CHARACTER expression.
	(ffecom_prepare_expr_): Ditto.

*** g77-e/gcc/f/com.c.~1~	Tue May 25 08:56:00 1999
--- g77-e/gcc/f/com.c	Tue May 25 17:42:35 1999
*************** ffecom_arg_ptr_to_expr (ffebld expr, tre
*** 10601,10604 ****
--- 10601,10607 ----
  	  == FFEINFO_kindtypeCHARACTER1);
  
+   while (ffebld_op (expr) == FFEBLD_opPAREN)
+     expr = ffebld_left (expr);
+ 
    catlist = ffecom_concat_list_new_ (expr, FFETARGET_charactersizeNONE);
    switch (ffecom_concat_list_count_ (catlist))
*************** ffecom_prepare_expr_ (ffebld expr, ffebl
*** 13042,13045 ****
--- 13045,13054 ----
    /* Generate whatever temporaries are needed to represent the result
       of the expression.  */
+ 
+   if (bt == FFEINFO_basictypeCHARACTER)
+     {
+       while (ffebld_op (expr) == FFEBLD_opPAREN)
+ 	expr = ffebld_left (expr);
+     }
  
    switch (ffebld_op (expr))

egcs/gcc/testsuite/ChangeLog:
1999-05-25  Craig Burley  <craig@jcb-sc.com>

	* g77.f-torture/compile/19990525-0.f: New test.

*** g77-e/gcc/testsuite/g77.f-torture/compile/19990525-0.f.~1~	Tue May 25 17:50:35 1999
--- g77-e/gcc/testsuite/g77.f-torture/compile/19990525-0.f	Tue May 25 17:51:00 1999
***************
*** 0 ****
--- 1,50 ----
+ * Mailing-List: contact egcs-bugs-help@egcs.cygnus.com; run by ezmlm
+ * Precedence: bulk
+ * Sender: owner-egcs-bugs@egcs.cygnus.com
+ * From: "Bjorn R. Bjornsson" <brb@halo.hi.is>
+ * Subject: g77 char expr. as arg to subroutine bug
+ * To: egcs-bugs@egcs.cygnus.com
+ * Date: Tue, 25 May 1999 14:45:56 +0000 (GMT)
+ * Content-Type: text/plain; charset=US-ASCII
+ * X-UIDL: 06000c94269ed6dfe826493e52a818b9
+ * 
+ * The following bug is in all snapshots starting
+ * from April 18.  I have only tested this on Alpha linux,
+ * and with FFECOM_FASTER_ARRAY_REFS set to 1.
+ * 
+ * Run the following through g77:
+ * 
+ 	subroutine	a
+ 	character*2	string1
+ 	character*2	string2
+ 	character*4	string3
+ 	string1 = 's1'
+ 	string2 = 's2'
+ c
+ c the next 2 lines are ok.
+ 	string3 = (string1 // string2)
+ 	call b(string1//string2)
+ c
+ c this line gives gcc/f/com.c:10660: failed assertion `hook'
+ 	call b((string1//string2))
+ 	end
+ * 
+ * the output from:
+ * 
+ * 	/usr/local/egcs-19990418/bin/g77 --verbose -c D.f
+ * 
+ * is:
+ * 
+ * on egcs-2.93.19 19990418 (gcc2 ss-980929 experimental) (from FSF-g77 version 0.5.24-19990418)
+ * Reading specs from /usr/local/egcs-19990418/lib/gcc-lib/alphaev56-unknown-linux-gnu/egcs-2.93.19/specs
+ * gcc version egcs-2.93.19 19990418 (gcc2 ss-980929 experimental)
+ *  /usr/local/egcs-19990418/lib/gcc-lib/alphaev56-unknown-linux-gnu/egcs-2.93.19/f771 D.f -quiet -dumpbase D.f -version -fversion -o /tmp/ccNpaaaa.s
+ * GNU F77 version egcs-2.93.19 19990418 (gcc2 ss-980929 experimental) (alphaev56-unknown-linux-gnu) compiled by GNU C version egcs-2.93.19 19990418 (gcc2 ss-980929 experimental).
+ * GNU Fortran Front End version 0.5.24-19990418
+ * ../../../egcs-19990418/gcc/f/com.c:10351: failed assertion `hook'
+ * g77: Internal compiler error: program f771 got fatal signal 6
+ * 
+ * Yours,
+ * 
+ * Bjorn R. Bjornsson
+ * brb@halo.hi.is


More information about the Gcc-patches mailing list