* [patch, fortran] Bug 66575 - Endless compilation on missing end interface
@ 2016-07-04 21:01 Jerry DeLisle
0 siblings, 0 replies; only message in thread
From: Jerry DeLisle @ 2016-07-04 21:01 UTC (permalink / raw)
To: fortran; +Cc: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 274 bytes --]
This patch and test case regression tested on x86-64.
Will commit under simple/obvious rule.
Regards,
Jerry
2016-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/66575
* decl.c (match_procedure_interface): Exit loop if procedure
interface refers to itself.
[-- Attachment #2: pr66575.diff --]
[-- Type: text/x-patch, Size: 634 bytes --]
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 724f14f7..1b62833f 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -5454,7 +5454,8 @@ match_procedure_interface (gfc_symbol **proc_if)
/* Resolve interface if possible. That way, attr.procedure is only set
if it is declared by a later procedure-declaration-stmt, which is
invalid per F08:C1216 (cf. resolve_procedure_interface). */
- while ((*proc_if)->ts.interface)
+ while ((*proc_if)->ts.interface
+ && *proc_if != (*proc_if)->ts.interface)
*proc_if = (*proc_if)->ts.interface;
if ((*proc_if)->attr.flavor == FL_UNKNOWN
[-- Attachment #3: pr66575.f90 --]
[-- Type: text/x-fortran, Size: 238 bytes --]
! { dg-do compile }
! Bug 66575 - Endless compilation on missing end interface
program p
procedure(g) :: g ! { dg-error "may not be used as its own interface" }
procedure(g) ! { dg-error "Syntax error in PROCEDURE statement" }
end
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-07-04 21:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-04 21:01 [patch, fortran] Bug 66575 - Endless compilation on missing end interface Jerry DeLisle
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).