public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug modula2/112920] gm2 hangs in the type resolver
Date: Tue, 09 Jan 2024 13:37:32 +0000	[thread overview]
Message-ID: <bug-112920-4-fpfGXpVePE@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112920-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112920

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Gaius Mulley <gaius@gcc.gnu.org>:

https://gcc.gnu.org/g:e3632a18d1e0b94b4c7b99a512b19c830ed3b228

commit r14-7064-ge3632a18d1e0b94b4c7b99a512b19c830ed3b228
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Tue Jan 9 13:36:44 2024 +0000

    PR modula2/112920 cc1gm2 hangs in the type resolver

    This patch contains a fix to gcc/m2/gm2-compiler/M2GCCDeclare.mod.
    The fix introduces a group of sets which can be compared.  The resolver
    will loop until there is no change in all sets within the group.
    Since symbols migrate from set to set without ever looping this
    will never hang.  Previously only the number of elements in a set
    were compared which resulted in a infinite spin.

    gcc/m2/ChangeLog:

            PR modula2/112920
            * gm2-compiler/M2GCCDeclare.mod (Group): New declaration.
            Import MakeSubrange, MakeConstVar, MakeConstLit and DivTrunc.
            (FreeGroup): New declaration.
            (GlobalGroup): New declaration.
            (ToBeSolvedByQuads): Remove.
            (NilTypedArrays): Remove.
            (PartiallyDeclared): Remove.
            (HeldByAlignment): Remove.
            (FinishedAlignment): Remove.
            (ToDoList): Remove.
            (DebugSet): Re-format.
            (DebugNumber): Re-format.
            (DebugSetNumbers): Reference sets using GlobalGroup.
            (AddSymToWatch): Re-format.
            (WatchIncludeList): Reference sets using GlobalGroup.
            (WatchRemoveList): Reference sets using GlobalGroup.
            (NewGroup): New procedure.
            (DisposeGroup): New procedure.
            (InitGroup): New procedure.
            (KillGroup): New procedure.
            (DupGroup): New procedure.
            (EqualGroup): New procedure.
            (LookupSet): New procedure.
            (CanDeclareTypePartially): Reference sets using GlobalGroup.
            (CompletelyResolved): Reference sets using GlobalGroup.
            (IsNilTypedArrays): Reference sets using GlobalGroup.
            (IsFullyDeclared): Reference sets using GlobalGroup.
            (IsPartiallyDeclared): Reference sets using GlobalGroup.
            (IsPartiallyOrFullyDeclared): Reference sets using GlobalGroup.
            (DeclareTypeConstFully): Reference sets using GlobalGroup.
            (bodyl): Remove.
            (Body): Use bodyt and to lookup the required set.
            (ForeachTryDeclare): Remove parameter l.  Lookup set instead.
            (DeclareOutstandingTypes): Add new rules setarraynul and setfully.
            Reference sets using GlobalGroup.
            (ActivateWatch): New procedure.
            (DeclareTypesConstantsProceduresInRange): Re-written to check
            group change.
            (DeclareTypesConstantsProcedures): Re-written to check
            group change.
            (DeclareBoolean): Reference sets using GlobalGroup.
            (DeclarePackedBoolean): Ditto.
            (DeclareDefaultConstants): Ditto.
            (FreeGroup): Initialized.
            (GlobalGroup): Ditto.
            * gm2-compiler/Sets.def (EqualSet): New procedure function.
            Remove export qualified list of identifiers.
            * gm2-compiler/Sets.mod (EqualSet): New procedure function.

    Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>

  parent reply	other threads:[~2024-01-09 13:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-08 13:54 [Bug modula2/112920] New: " gaius at gcc dot gnu.org
2023-12-08 13:58 ` [Bug modula2/112920] " gaius at gcc dot gnu.org
2024-01-08 23:46 ` gaius at gcc dot gnu.org
2024-01-09 13:37 ` cvs-commit at gcc dot gnu.org [this message]
2024-01-09 14:01 ` gaius at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-112920-4-fpfGXpVePE@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).