public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/111434] New: Infinite loop with limited withs?
@ 2023-09-16 14:20 p.p11 at orange dot fr
2023-09-24 21:41 ` [Bug ada/111434] [13/14 regression] infinite loop with limited with clauses ebotcazou at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: p.p11 at orange dot fr @ 2023-09-16 14:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111434
Bug ID: 111434
Summary: Infinite loop with limited withs?
Product: gcc
Version: 13.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: p.p11 at orange dot fr
CC: dkm at gcc dot gnu.org
Target Milestone: ---
Created attachment 55909
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55909&action=edit
Full source code reproducer.
Compiling source codes with multiple limited withs probably leads to an
infinite loop:
% gcc -c -gnatv pyside6-qtcore.adb
GNAT 13.1.0
Copyright 1992-2023, Free Software Foundation, Inc.
^C
When commenting one or several withs the compiler finish.
HTH, Pascal.
Full source codes in attached archive file.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/111434] [13/14 regression] infinite loop with limited with clauses
2023-09-16 14:20 [Bug ada/111434] New: Infinite loop with limited withs? p.p11 at orange dot fr
@ 2023-09-24 21:41 ` ebotcazou at gcc dot gnu.org
2023-09-24 21:53 ` ebotcazou at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-09-24 21:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111434
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-09-24
Summary|Infinite loop with limited |[13/14 regression] infinite
|withs? |loop with limited with
| |clauses
Status|UNCONFIRMED |NEW
CC| |ebotcazou at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Confirmed, it's an assertion failure on the mainline:
eric@fomalhaut:~/build/gcc/native/tmp>gcc -c pyside6-qtcore.adb
+===========================GNAT BUG DETECTED==============================+
| 14.0.0 20230918 (experimental) [master r14-4085-g93996cfb308]
(x86_64-suse-linux) |
| Assert_Failure sem_ch10.adb:5305 |
| Error detected at pyside6-qtcore-qtmsgtype.ads:2:23 |
| Compiling pyside6-qtcore.adb |
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/111434] [13/14 regression] infinite loop with limited with clauses
2023-09-16 14:20 [Bug ada/111434] New: Infinite loop with limited withs? p.p11 at orange dot fr
2023-09-24 21:41 ` [Bug ada/111434] [13/14 regression] infinite loop with limited with clauses ebotcazou at gcc dot gnu.org
@ 2023-09-24 21:53 ` ebotcazou at gcc dot gnu.org
2023-10-10 12:14 ` [Bug ada/111434] [13/14 regression] infinite loop with multiple " cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-09-24 21:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111434
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |ebotcazou at gcc dot gnu.org
--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Investigating.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/111434] [13/14 regression] infinite loop with multiple limited with clauses
2023-09-16 14:20 [Bug ada/111434] New: Infinite loop with limited withs? p.p11 at orange dot fr
2023-09-24 21:41 ` [Bug ada/111434] [13/14 regression] infinite loop with limited with clauses ebotcazou at gcc dot gnu.org
2023-09-24 21:53 ` ebotcazou at gcc dot gnu.org
@ 2023-10-10 12:14 ` cvs-commit at gcc dot gnu.org
2023-10-10 15:12 ` cvs-commit at gcc dot gnu.org
2023-10-10 15:13 ` ebotcazou at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-10-10 12:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111434
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marc Poulhi?s <dkm@gcc.gnu.org>:
https://gcc.gnu.org/g:6bd83c90191a512d2c9094623248219d610b4372
commit r14-4532-g6bd83c90191a512d2c9094623248219d610b4372
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Tue Sep 26 22:54:12 2023 +0200
ada: Fix infinite loop with multiple limited with clauses
This occurs when one of the types has an incomplete declaration in addition
to its full declaration in its package. In this case AI05-129 says that the
incomplete type is not part of the limited view of the package, i.e. only
the full view is. Now, in the GNAT implementation, it's the opposite in the
regular view of the package, i.e. the incomplete type is the visible one.
That's why the implementation needs to also swap the types on the
visibility
chain while it is swapping the views when the clauses are either installed
or removed. This works correctly for the installation, but does not for the
removal, so this change rewrites the code doing the latter.
gcc/ada/
PR ada/111434
* sem_ch10.adb (Replace): New procedure to replace an entity with
another on the homonym chain.
(Install_Limited_With_Clause): Rename Non_Lim_View to Typ for the
sake of consistency. Call Replace to do the replacements and split
the code into the regular and the special cases. Add debuggging
output controlled by -gnatdi.
(Install_With_Clause): Print the Parent_With and Implicit_With
flags
in the debugging output controlled by -gnatdi.
(Remove_Limited_With_Unit.Restore_Chain_For_Shadow (Shadow)):
Rewrite
using a direct replacement of E4 by E2. Call Replace to do the
replacements. Add debuggging output controlled by -gnatdi.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/111434] [13/14 regression] infinite loop with multiple limited with clauses
2023-09-16 14:20 [Bug ada/111434] New: Infinite loop with limited withs? p.p11 at orange dot fr
` (2 preceding siblings ...)
2023-10-10 12:14 ` [Bug ada/111434] [13/14 regression] infinite loop with multiple " cvs-commit at gcc dot gnu.org
@ 2023-10-10 15:12 ` cvs-commit at gcc dot gnu.org
2023-10-10 15:13 ` ebotcazou at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-10-10 15:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111434
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Eric Botcazou
<ebotcazou@gcc.gnu.org>:
https://gcc.gnu.org/g:8a5fe7fc0c4aecca1fec88b7aa608745ade1b045
commit r13-7942-g8a5fe7fc0c4aecca1fec88b7aa608745ade1b045
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Tue Sep 26 22:54:12 2023 +0200
ada: Fix infinite loop with multiple limited with clauses
This occurs when one of the types has an incomplete declaration in addition
to its full declaration in its package. In this case AI05-129 says that the
incomplete type is not part of the limited view of the package, i.e. only
the full view is. Now, in the GNAT implementation, it's the opposite in the
regular view of the package, i.e. the incomplete type is the visible one.
That's why the implementation needs to also swap the types on the
visibility
chain while it is swapping the views when the clauses are either installed
or removed. This works correctly for the installation, but does not for the
removal, so this change rewrites the code doing the latter.
gcc/ada/
PR ada/111434
* sem_ch10.adb (Replace): New procedure to replace an entity with
another on the homonym chain.
(Install_Limited_With_Clause): Rename Non_Lim_View to Typ for the
sake of consistency. Call Replace to do the replacements and split
the code into the regular and the special cases. Add debuggging
output controlled by -gnatdi.
(Install_With_Clause): Print the Parent_With and Implicit_With
flags
in the debugging output controlled by -gnatdi.
(Remove_Limited_With_Unit.Restore_Chain_For_Shadow (Shadow)):
Rewrite
using a direct replacement of E4 by E2. Call Replace to do the
replacements. Add debuggging output controlled by -gnatdi.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/111434] [13/14 regression] infinite loop with multiple limited with clauses
2023-09-16 14:20 [Bug ada/111434] New: Infinite loop with limited withs? p.p11 at orange dot fr
` (3 preceding siblings ...)
2023-10-10 15:12 ` cvs-commit at gcc dot gnu.org
@ 2023-10-10 15:13 ` ebotcazou at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-10-10 15:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111434
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |13.3
--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Fixed on mainline and 13 branch. Thanks for reporting the problem.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-10-10 15:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-16 14:20 [Bug ada/111434] New: Infinite loop with limited withs? p.p11 at orange dot fr
2023-09-24 21:41 ` [Bug ada/111434] [13/14 regression] infinite loop with limited with clauses ebotcazou at gcc dot gnu.org
2023-09-24 21:53 ` ebotcazou at gcc dot gnu.org
2023-10-10 12:14 ` [Bug ada/111434] [13/14 regression] infinite loop with multiple " cvs-commit at gcc dot gnu.org
2023-10-10 15:12 ` cvs-commit at gcc dot gnu.org
2023-10-10 15:13 ` ebotcazou at gcc dot gnu.org
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).