Fortran: adjust error message for SHORT and LONG intrinsics

Message ID 6189797e-b646-fb2b-0d23-befa8ed1aa55@gmx.ch
State New
Headers
Series Fortran: adjust error message for SHORT and LONG intrinsics |

Commit Message

Manfred Schwarb Oct. 29, 2021, 2:12 p.m. UTC
  Hi,

on 2019-07-23, support for SHORT and LONG intrinsics were removed be Steve Kargl by
adding an error message in check.c.  However, the error message
  Error: 'long' intrinsic subprogram at (1) has been deprecated
is misleading, as support has been disabled by this patch.

Adjust the error message. This error message does not appear in the testsuite AFAIK.

Signed-off-by Manfred Schwarb <manfred99@gmx.ch>


[Note: I do not have commit access]
  

Comments

Harald Anlauf Oct. 29, 2021, 7:51 p.m. UTC | #1
Hi Manfred,

Am 29.10.21 um 16:12 schrieb Manfred Schwarb via Fortran:
> Hi,
>
> on 2019-07-23, support for SHORT and LONG intrinsics were removed be Steve Kargl by
> adding an error message in check.c.  However, the error message
>    Error: 'long' intrinsic subprogram at (1) has been deprecated
> is misleading, as support has been disabled by this patch.
>
> Adjust the error message. This error message does not appear in the testsuite AFAIK.

the patch looks fine.  A testcase checking the error message is missing,
as well as a ChangeLog entry.

Thanks,
Harald

> Signed-off-by Manfred Schwarb <manfred99@gmx.ch>
>
>
> [Note: I do not have commit access]
>
  
Manfred Schwarb Oct. 29, 2021, 11:15 p.m. UTC | #2
Am 29.10.21 um 21:51 schrieb Harald Anlauf via Fortran:
> Hi Manfred,
>
> Am 29.10.21 um 16:12 schrieb Manfred Schwarb via Fortran:
>> Hi,
>>
>> on 2019-07-23, support for SHORT and LONG intrinsics were removed be Steve Kargl by
>> adding an error message in check.c.  However, the error message
>>    Error: 'long' intrinsic subprogram at (1) has been deprecated
>> is misleading, as support has been disabled by this patch.
>>
>> Adjust the error message. This error message does not appear in the testsuite AFAIK.
>
> the patch looks fine.  A testcase checking the error message is missing,
> as well as a ChangeLog entry.

Sorry, forgot the changelog entry, I added it to the patch now.
Testcase was missing already before, but I added a trivial test to the patch for completeness.

>
> Thanks,
> Harald
>
>> Signed-off-by Manfred Schwarb <manfred99@gmx.ch>
>>
>>
>> [Note: I do not have commit access]
>>
>
>
  
Harald Anlauf Oct. 30, 2021, 6:11 p.m. UTC | #3
Committed as r12-4807.

Thanks for the patch!

Harald

Am 30.10.21 um 01:15 schrieb Manfred Schwarb via Gcc-patches:
> Am 29.10.21 um 21:51 schrieb Harald Anlauf via Fortran:
>> Hi Manfred,
>>
>> Am 29.10.21 um 16:12 schrieb Manfred Schwarb via Fortran:
>>> Hi,
>>>
>>> on 2019-07-23, support for SHORT and LONG intrinsics were removed be Steve Kargl by
>>> adding an error message in check.c.  However, the error message
>>>     Error: 'long' intrinsic subprogram at (1) has been deprecated
>>> is misleading, as support has been disabled by this patch.
>>>
>>> Adjust the error message. This error message does not appear in the testsuite AFAIK.
>>
>> the patch looks fine.  A testcase checking the error message is missing,
>> as well as a ChangeLog entry.
>
> Sorry, forgot the changelog entry, I added it to the patch now.
> Testcase was missing already before, but I added a trivial test to the patch for completeness.
>
>>
>> Thanks,
>> Harald
>>
>>> Signed-off-by Manfred Schwarb <manfred99@gmx.ch>
>>>
>>>
>>> [Note: I do not have commit access]
>>>
>>
>>
>
  

Patch

--- gcc/gcc/fortran/check.c.orig	2021-10-15 02:20:28.825876592 +0200
+++ gcc/gcc/fortran/check.c	2021-10-29 14:44:51.771512312 +0200
@@ -3240,7 +3240,7 @@  gfc_check_intconv (gfc_expr *x)
   if (strcmp (gfc_current_intrinsic, "short") == 0
       || strcmp (gfc_current_intrinsic, "long") == 0)
     {
-      gfc_error ("%qs intrinsic subprogram at %L has been deprecated.  "
+      gfc_error ("%qs intrinsic subprogram at %L has been removed.  "
 		 "Use INT intrinsic subprogram.", gfc_current_intrinsic,
 		 &x->where);
       return false;