[Bug modula2/109586] cc1gm2 ICE when compiling large source file

2023-07-27 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109586

--- Comment #5 from CVS Commits  ---
The releases/gcc-13 branch has been updated by Gaius Mulley
:

https://gcc.gnu.org/g:2286745b12070320c8dcc5c75d76dd184cb7645e

commit r13-7616-g2286745b12070320c8dcc5c75d76dd184cb7645e
Author: Gaius Mulley 
Date:   Thu Jul 27 22:11:26 2023 +0100

PR modula2/109586 cc1gm2 ICE when compiling large source files.

The function m2block_RememberConstant calls m2tree_IsAConstant.
However IsAConstant does not recognise TREE_CODE(t) ==
CONSTRUCTOR as a constant.  Without this patch CONSTRUCTOR
contants are garbage collected (and not preserved) resulting in
a corrupt tree and crash.

gcc/m2/ChangeLog:

PR modula2/109586
* gm2-gcc/m2tree.cc (m2tree_IsAConstant): Add (TREE_CODE
(t) == CONSTRUCTOR) to expression.

(cherry picked from commit a7e1ee39e4fa37d005929c4ff9457d1a199559c6)

Signed-off-by: Gaius Mulley 

[Bug modula2/109586] cc1gm2 ICE when compiling large source file

2023-04-21 Thread gaius at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109586

Gaius Mulley  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #4 from Gaius Mulley  ---
Closing as patch has been applied and no change to regression tests after
successful bootstrap.

[Bug modula2/109586] cc1gm2 ICE when compiling large source file

2023-04-21 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109586

--- Comment #3 from CVS Commits  ---
The master branch has been updated by Gaius Mulley :

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

commit r14-140-ga7e1ee39e4fa37d005929c4ff9457d1a199559c6
Author: Gaius Mulley 
Date:   Fri Apr 21 13:19:54 2023 +0100

PR modula2/109586 cc1gm2 ICE when compiling large source files.

The function m2block_RememberConstant calls m2tree_IsAConstant.
However IsAConstant does not recognise TREE_CODE(t) ==
CONSTRUCTOR as a constant.  Without this patch CONSTRUCTOR
contants are garbage collected (and not preserved) resulting in
a corrupt tree and crash.

gcc/m2/ChangeLog:

PR modula2/109586
* gm2-gcc/m2tree.cc (m2tree_IsAConstant): Add (TREE_CODE
(t) == CONSTRUCTOR) to expression.

Signed-off-by: Gaius Mulley 

[Bug modula2/109586] cc1gm2 ICE when compiling large source file

2023-04-21 Thread gaius at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109586

--- Comment #2 from Gaius Mulley  ---
Created attachment 54902
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54902&action=edit
Add missing constant type to m2tree_IsAConstant

The function m2block_RememberConstant calls m2tree_IsAConstant.  However
IsAConstant does not recognise TREE_CODE(t) == CONSTRUCTOR as a constant.
This proposed patch updates IsAConstant and in turn fixes the PR.

[Bug modula2/109586] cc1gm2 ICE when compiling large source file

2023-04-21 Thread gaius at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109586

Gaius Mulley  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
 Ever confirmed|0   |1
   Last reconfirmed||2023-04-21

--- Comment #1 from Gaius Mulley  ---
After some investigation it appears to be a GC problem and in particular a
constant is being garbage collected.  Disabling GC allows the compile to
succeed.