public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/99826] New: GIMPLE FE fails to grok pointer declarators
@ 2021-03-30 9:58 rguenth at gcc dot gnu.org
2021-03-30 12:59 ` [Bug c/99826] " rguenth at gcc dot gnu.org
2024-03-08 5:13 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-03-30 9:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99826
Bug ID: 99826
Summary: GIMPLE FE fails to grok pointer declarators
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: rguenth at gcc dot gnu.org
Target Milestone: ---
char * __GIMPLE(ssa) foo(char *p)
{
char *_2;
__BB(2):
_2 = p_1(D);
return _2;
}
shows two issues, first the return type declaration causes __GIMPLE to be
not associated with the function, failing it to parse at all. Fixing that
using a typedef shows that we fail to parse the SSA declaration 'char *_2'
as SSA name declaration because we have
/* Handle SSA name decls specially, they do not go into the identifier
table but we simply build the SSA name for later lookup. */
unsigned version, ver_offset;
if (declarator->kind == cdk_id
&& is_gimple_reg_type (specs->type)
but declarator is
$5 = {kind = cdk_pointer, id_loc = 0, declarator = 0x3775200, u = {id = {
id = <tree 0x0>, attrs = <tree 0x0>}, arg_info = 0x0, array = {
dimen = <tree 0x0>, quals = 0, attrs = <tree 0x0>, static_p = 0,
vla_unspec_p = 0}, pointer_quals = 0, attrs = <tree 0x0>}}
in this case. It looks like we need to unwrap cdk_pointer at least
(and build the actual pointer type in the SSA case). The "early-out"
case for SSA names tries to avoid start_decl and building a decl
(and registering it in the binding for future lookup).
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-08 5:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30 9:58 [Bug c/99826] New: GIMPLE FE fails to grok pointer declarators rguenth at gcc dot gnu.org
2021-03-30 12:59 ` [Bug c/99826] " rguenth at gcc dot gnu.org
2024-03-08 5:13 ` pinskia 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).