* [Patch, Fortran, F03] PR 71861: [7/8/9 Regression] ICE in write_symbol(): bad module symbol
@ 2019-03-19 23:20 Janus Weil
2019-03-20 17:54 ` Thomas Koenig
0 siblings, 1 reply; 3+ messages in thread
From: Janus Weil @ 2019-03-19 23:20 UTC (permalink / raw)
To: gfortran, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 200 bytes --]
Hi all,
the attached one-line patch fixes an ICE-on-invalid regression with
abstract interfaces. Regtests cleanly on x86_64-linux-gnu. Ok for
trunk and the release branches (7 and 8)?
Cheers,
Janus
[-- Attachment #2: pr71861.diff --]
[-- Type: text/x-patch, Size: 2286 bytes --]
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 4dd35ec6030..cee2b2cfd15 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2019-03-19 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/71861
+ * symbol.c (check_conflict): ABSTRACT attribute conflicts with
+ INTRINSIC attribute.
+
2019-03-18 Thomas Koenig <tkoeng@gcc.gnu.org>
PR fortran/68009
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index c342d62ead1..ec753229a98 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -557,6 +557,7 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
conf (external, intrinsic);
conf (entry, intrinsic);
+ conf (abstract, intrinsic);
if ((attr->if_source == IFSRC_DECL && !attr->procedure) || attr->contained)
conf (external, subroutine);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index cf01b2fea19..4649e282f64 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-03-19 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/71861
+ * gfortran.dg/interface_abstract_5.f90: New test case.
+
2019-03-19 Martin Sebor <msebor@redhat.com>
PR tree-optimization/89644
diff --git a/gcc/testsuite/gfortran.dg/interface_abstract_5.f90 b/gcc/testsuite/gfortran.dg/interface_abstract_5.f90
new file mode 100644
index 00000000000..fddf6b89d27
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/interface_abstract_5.f90
@@ -0,0 +1,32 @@
+! { dg-do compile }
+!
+! PR 71861: [7/8/9 Regression] [F03] ICE in write_symbol(): bad module symbol
+!
+! Contributed by Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de>
+
+module m1
+ intrinsic abs
+ abstract interface
+ function abs(x) ! { dg-error "ABSTRACT attribute conflicts with INTRINSIC attribute" }
+ real :: abs, x
+ end
+ end interface
+end
+
+module m2
+ abstract interface
+ function abs(x)
+ real :: abs, x
+ end
+ end interface
+ intrinsic abs ! { dg-error "ABSTRACT attribute conflicts with INTRINSIC attribute" }
+end
+
+module m3
+ abstract interface
+ function f(x)
+ real :: f, x
+ end
+ end interface
+ intrinsic f ! { dg-error "ABSTRACT attribute conflicts with INTRINSIC attribute" }
+end
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch, Fortran, F03] PR 71861: [7/8/9 Regression] ICE in write_symbol(): bad module symbol
2019-03-19 23:20 [Patch, Fortran, F03] PR 71861: [7/8/9 Regression] ICE in write_symbol(): bad module symbol Janus Weil
@ 2019-03-20 17:54 ` Thomas Koenig
2019-03-20 21:37 ` Janus Weil
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Koenig @ 2019-03-20 17:54 UTC (permalink / raw)
To: Janus Weil, gfortran, gcc-patches
Hi Janus,
> the attached one-line patch fixes an ICE-on-invalid regression with
> abstract interfaces. Regtests cleanly on x86_64-linux-gnu. Ok for
> trunk and the release branches (7 and 8)?
OK for all.
Thanks for the patch!
Regards
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch, Fortran, F03] PR 71861: [7/8/9 Regression] ICE in write_symbol(): bad module symbol
2019-03-20 17:54 ` Thomas Koenig
@ 2019-03-20 21:37 ` Janus Weil
0 siblings, 0 replies; 3+ messages in thread
From: Janus Weil @ 2019-03-20 21:37 UTC (permalink / raw)
To: Thomas Koenig; +Cc: gfortran, gcc-patches
Am Mi., 20. März 2019 um 18:26 Uhr schrieb Thomas Koenig
<tkoenig@netcologne.de>:
>
> Hi Janus,
>
> > the attached one-line patch fixes an ICE-on-invalid regression with
> > abstract interfaces. Regtests cleanly on x86_64-linux-gnu. Ok for
> > trunk and the release branches (7 and 8)?
>
> OK for all.
Thanks, Thomas. Committed to trunk as r269827. Will do the backports
within a week or so.
Cheers,
Janus
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-20 21:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-19 23:20 [Patch, Fortran, F03] PR 71861: [7/8/9 Regression] ICE in write_symbol(): bad module symbol Janus Weil
2019-03-20 17:54 ` Thomas Koenig
2019-03-20 21:37 ` Janus Weil
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).