public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fortran: adjust error message for SHORT and LONG intrinsics
@ 2021-10-29 14:12 Manfred Schwarb
  2021-10-29 19:51 ` Harald Anlauf
  0 siblings, 1 reply; 5+ messages in thread
From: Manfred Schwarb @ 2021-10-29 14:12 UTC (permalink / raw)
  To: fortran, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 450 bytes --]

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]

[-- Attachment #2: fix_error_message_for_short_and_long.patch --]
[-- Type: text/x-patch, Size: 543 bytes --]

--- 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;

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fortran: adjust error message for SHORT and LONG intrinsics
  2021-10-29 14:12 [PATCH] Fortran: adjust error message for SHORT and LONG intrinsics Manfred Schwarb
@ 2021-10-29 19:51 ` Harald Anlauf
  2021-10-29 23:15   ` Manfred Schwarb
  0 siblings, 1 reply; 5+ messages in thread
From: Harald Anlauf @ 2021-10-29 19:51 UTC (permalink / raw)
  To: Manfred Schwarb, fortran, gcc-patches

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]
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fortran: adjust error message for SHORT and LONG intrinsics
  2021-10-29 19:51 ` Harald Anlauf
@ 2021-10-29 23:15   ` Manfred Schwarb
  2021-10-30 18:11     ` Harald Anlauf
  0 siblings, 1 reply; 5+ messages in thread
From: Manfred Schwarb @ 2021-10-29 23:15 UTC (permalink / raw)
  To: Harald Anlauf, fortran; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 946 bytes --]

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]
>>
>
>


[-- Attachment #2: fix_error_message_for_short_and_long.patch --]
[-- Type: text/x-patch, Size: 993 bytes --]

2021-10-30  Manfred Schwarb  <manfred99@gmx.ch>

gcc/fortran/ChangeLog:

	* check.c (gfc_check_intconv): Change error message.

gcc/testsuite/ChangeLog:

	* gfortran.dg/intrinsic_short-long.f90: New test.

--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -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;
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/intrinsic_short-long.f90
@@ -0,0 +1,11 @@
+! { dg-do compile }
+!
+! Checking for removal of SHORT and LONG intrinsics.
+!
+  real,parameter :: a=3.1415927
+  integer :: i
+
+  i=SHORT(a) ! { dg-error "has been removed" }
+  i=LONG(a)  ! { dg-error "has been removed" }
+
+  end

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fortran: adjust error message for SHORT and LONG intrinsics
  2021-10-29 23:15   ` Manfred Schwarb
@ 2021-10-30 18:11     ` Harald Anlauf
  2021-10-30 18:11       ` Harald Anlauf
  0 siblings, 1 reply; 5+ messages in thread
From: Harald Anlauf @ 2021-10-30 18:11 UTC (permalink / raw)
  To: Manfred Schwarb, fortran; +Cc: gcc-patches

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]
>>>
>>
>>
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fortran: adjust error message for SHORT and LONG intrinsics
  2021-10-30 18:11     ` Harald Anlauf
@ 2021-10-30 18:11       ` Harald Anlauf
  0 siblings, 0 replies; 5+ messages in thread
From: Harald Anlauf @ 2021-10-30 18:11 UTC (permalink / raw)
  To: gcc-patches; +Cc: fortran

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]
>>>
>>
>>
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-30 18:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29 14:12 [PATCH] Fortran: adjust error message for SHORT and LONG intrinsics Manfred Schwarb
2021-10-29 19:51 ` Harald Anlauf
2021-10-29 23:15   ` Manfred Schwarb
2021-10-30 18:11     ` Harald Anlauf
2021-10-30 18:11       ` Harald Anlauf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).