Bug 114418 - Missing import of TSIZE from system causes ICE
Summary: Missing import of TSIZE from system causes ICE
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: modula2 (show other bugs)
Version: 14.0
: P3 normal
Target Milestone: ---
Assignee: Gaius Mulley
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-21 17:46 UTC by Gaius Mulley
Modified: 2024-03-21 18:31 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2024-03-21 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gaius Mulley 2024-03-21 17:46:59 UTC
As reported on the mailing list.  gm2 will ICE if given:

MODULE missingtsize ;

CONST
   NoOfBytes = TSIZE (CARDINAL) ;

BEGIN

END missingtsize.
Comment 1 Gaius Mulley 2024-03-21 17:47:18 UTC
Confirmed.
Comment 2 GCC Commits 2024-03-21 18:31:05 UTC
The master branch has been updated by Gaius Mulley <gaius@gcc.gnu.org>:

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

commit r14-9598-gba744d50ac0360f7992a42494db766f6548913e3
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Thu Mar 21 18:30:23 2024 +0000

    PR modula2/114418 missing import of TSIZE from system causes ICE
    
    This patch detects whether the symbol func is NulSym before generating
    an error and if so just uses the token location and fixed string to
    generate an error message.
    
    gcc/m2/ChangeLog:
    
            PR modula2/114418
            * gm2-compiler/PCSymBuild.mod (PushConstFunctionType): Check
            func against NulSym and issue an error.
    
    gcc/testsuite/ChangeLog:
    
            PR modula2/114418
            * gm2/pim/fail/missingtsize.mod: New test.
            * gm2/pim/fail/missingtsize2.mod: New test.
    
    Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Comment 3 Gaius Mulley 2024-03-21 18:31:38 UTC
Closing now that the patch has been applied.