Bug 107392 - excessive compilation time for decimal_literal - that should be rejected as type-error
Summary: excessive compilation time for decimal_literal - that should be rejected as t...
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 12.2.1
: P3 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: compile-time-hog
Depends on:
Blocks:
 
Reported: 2022-10-25 11:45 UTC by jwaldmann
Modified: 2023-05-11 16:07 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2023-05-11 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jwaldmann 2022-10-25 11:45:42 UTC
this compilation does not seem to finish:

$ echo "procedure main is x : integer := 1.1e11111_11; begin null; end main;" > main.adb
$ gcc -c main.adb

$ gcc --version
gcc (GCC) 12.2.1 20220819 (Red Hat 12.2.1-2)


while the program should just be rejected - as does indeed happen for

$ echo "procedure main is x : integer := 1.1e11111_1; begin null; end main;" > main.adb
$ gcc -c main.adb
main.adb:1:34: error: expected type "Standard.Integer"
main.adb:1:34: error: found type universal real
Comment 1 Eric Botcazou 2023-05-11 16:07:51 UTC
A guard against ludicrous inputs is indeed missing here.