diff mbox

[fortran] PR46301 [4.6 Regression] Missing diagnosis for "len=:"

Message ID 4CF18661.8000905@frontier.com
State New
Headers show

Commit Message

Jerry DeLisle Nov. 27, 2010, 10:29 p.m. UTC
Committed as obvious as well as discussed with Tobias on IRC.  Regression tested 
on x86-64-Gnu-Linux,

Committed revision 167212.

Regards,

Jerry

2010-11-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/46301
	trans-expr.c (gfc_trans_assignment): Add error message for not
	implemented assignment to deferred-length character variable.

Comments

Richard Biener Nov. 27, 2010, 10:38 p.m. UTC | #1
On Sat, Nov 27, 2010 at 11:29 PM, Jerry DeLisle <jvdelisle@frontier.com> wrote:
> Committed as obvious as well as discussed with Tobias on IRC.  Regression
> tested on x86-64-Gnu-Linux,
>
> Committed revision 167212.

For not implemented functionality GCC generally uses sorry ()
(I see one use in fortran/ but no gfc_sorry).

Richard.

> Regards,
>
> Jerry
>
> 2010-11-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
>
>        PR fortran/46301
>        trans-expr.c (gfc_trans_assignment): Add error message for not
>        implemented assignment to deferred-length character variable.
>
>
> --- trunk/gcc/fortran/trans-expr.c      2010/11/27 21:27:49     167211
> +++ trunk/gcc/fortran/trans-expr.c      2010/11/27 22:12:46     167212
> @@ -5806,6 +5806,13 @@
>                      bool dealloc)
>  {
>   tree tmp;
> +
> +  if (expr1->ts.type == BT_CHARACTER && expr1->ts.deferred)
> +    {
> +      gfc_error ("Assignment to deferred-length character variable at %L "
> +                "not implemented", &expr1->where);
> +      return NULL_TREE;
> +    }
>
>   /* Special case a single function returning an array.  */
>   if (expr2->expr_type == EXPR_FUNCTION && expr2->rank > 0)
>
Jerry DeLisle Nov. 27, 2010, 11:18 p.m. UTC | #2
On 11/27/2010 02:38 PM, Richard Guenther wrote:
> On Sat, Nov 27, 2010 at 11:29 PM, Jerry DeLisle<jvdelisle@frontier.com>  wrote:
>> Committed as obvious as well as discussed with Tobias on IRC.  Regression
>> tested on x86-64-Gnu-Linux,
>>
>> Committed revision 167212.
>
> For not implemented functionality GCC generally uses sorry ()
> (I see one use in fortran/ but no gfc_sorry).

Thanks for the tip, but we get a nice error locus off this using gfc_error. 
Hopefully we will get it implemented soon.

Jerry
diff mbox

Patch

--- trunk/gcc/fortran/trans-expr.c	2010/11/27 21:27:49	167211
+++ trunk/gcc/fortran/trans-expr.c	2010/11/27 22:12:46	167212
@@ -5806,6 +5806,13 @@ 
  		      bool dealloc)
  {
    tree tmp;
+
+  if (expr1->ts.type == BT_CHARACTER && expr1->ts.deferred)
+    {
+      gfc_error ("Assignment to deferred-length character variable at %L "
+		 "not implemented", &expr1->where);
+      return NULL_TREE;
+    }

    /* Special case a single function returning an array.  */
    if (expr2->expr_type == EXPR_FUNCTION && expr2->rank > 0)