Bug 108152 - gcc.dg/pr71558.c fails for LLP64
Summary: gcc.dg/pr71558.c fails for LLP64
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: testsuite (show other bugs)
Version: 13.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: testsuite-fail
Depends on:
Blocks:
 
Reported: 2022-12-17 07:26 UTC by nightstrike
Modified: 2022-12-30 01:26 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nightstrike 2022-12-17 07:26:58 UTC
gcc.dg/pr71558.c has the following lines:

__SIZE_TYPE__ strlen (const char *);
void *malloc (__SIZE_TYPE__);
__SIZE_TYPE__ b = strlen (a);


These are good in that they support LLP64 through size_t, however they fail because this test case is compiled with -ansi.  When using -ansi, the following warnings appear:

gcc.dg/pr71558.c:6:1: error: ISO C90 does not support 'long long' [-Wlong-long]
gcc.dg/pr71558.c:7:1: error: ISO C90 does not support 'long long' [-Wlong-long]
gcc.dg/pr71558.c:14:1: error: ISO C90 does not support 'long long' [-Wlong-long]


And of course, on LLP64 systems, __SIZE_TYPE__ is in fact a long long.  Hopefully, -ansi can just be removed from the compile options, although I don't know how to do that.
Comment 1 Andrew Pinski 2022-12-17 07:30:48 UTC
{ dg-options "" }
Comment 2 nightstrike 2022-12-21 03:49:02 UTC
(In reply to Andrew Pinski from comment #1)
> { dg-options "" }

That would remove every option, no?  Do others matter, like -pedantic, or whatever else is there?
Comment 3 nightstrike 2022-12-30 01:26:18 UTC
(In reply to Andrew Pinski from comment #1)
> { dg-options "" }

So just to be pedantic (pun intended!), the options currently in use are:

-fdiagnostics-plain-output -ansi -pedantic-errors


If we use dg-options "", both -ansi and -pedantic-errors are removed.  -fdiagnostics-plain-output stays.  Is this ok?