public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/101204] New: infinite recursion in gtype-desc.c
@ 2021-06-25 7:39 dcb314 at hotmail dot com
2021-06-25 8:39 ` [Bug middle-end/101204] " jakub at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: dcb314 at hotmail dot com @ 2021-06-25 7:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101204
Bug ID: 101204
Summary: infinite recursion in gtype-desc.c
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
For a recent gcc build with clang, I get:
gtype-desc.c:10853:1: warning: all paths through this function will call itself
[-Winfinite-recursion]
Source code is
void
gt_pch_nx (int_hash<key_type_t,0,UINT_MAX>* x ATTRIBUTE_UNUSED,
ATTRIBUTE_UNUSED gt_pointer_operator op,
ATTRIBUTE_UNUSED void *cookie)
{
gt_pch_nx (&((*x)), op, cookie);
}
I think this has probably first appeared in the last week or so.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/101204] infinite recursion in gtype-desc.c
2021-06-25 7:39 [Bug c/101204] New: infinite recursion in gtype-desc.c dcb314 at hotmail dot com
@ 2021-06-25 8:39 ` jakub at gcc dot gnu.org
2021-06-25 23:49 ` msebor at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-06-25 8:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101204
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org,
| |msebor at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Most likely r12-1801-g7036e9ef462fde8181bece4ac4e03f3aa27204dc
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/101204] infinite recursion in gtype-desc.c
2021-06-25 7:39 [Bug c/101204] New: infinite recursion in gtype-desc.c dcb314 at hotmail dot com
2021-06-25 8:39 ` [Bug middle-end/101204] " jakub at gcc dot gnu.org
@ 2021-06-25 23:49 ` msebor at gcc dot gnu.org
2021-06-26 7:48 ` dcb314 at hotmail dot com
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-06-25 23:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101204
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
gtype-desc.c is a generated file. There's also r12-1096. Without it, r12-1801
wouldn't compile.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/101204] infinite recursion in gtype-desc.c
2021-06-25 7:39 [Bug c/101204] New: infinite recursion in gtype-desc.c dcb314 at hotmail dot com
2021-06-25 8:39 ` [Bug middle-end/101204] " jakub at gcc dot gnu.org
2021-06-25 23:49 ` msebor at gcc dot gnu.org
@ 2021-06-26 7:48 ` dcb314 at hotmail dot com
2021-07-01 9:24 ` [Bug middle-end/101204] [12 Regression] infinite recursion in gtype-desc.c since r12-1801-g7036e9ef462fde8181bece4ac4e03f3aa27204dc marxin at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: dcb314 at hotmail dot com @ 2021-06-26 7:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101204
--- Comment #3 from David Binderman <dcb314 at hotmail dot com> ---
If there is some confusion as to which commit caused the problem,
I can do a git bisect.
Not before Tuesday 19 June. I have quite a few things in my intray right now.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/101204] [12 Regression] infinite recursion in gtype-desc.c since r12-1801-g7036e9ef462fde8181bece4ac4e03f3aa27204dc
2021-06-25 7:39 [Bug c/101204] New: infinite recursion in gtype-desc.c dcb314 at hotmail dot com
` (2 preceding siblings ...)
2021-06-26 7:48 ` dcb314 at hotmail dot com
@ 2021-07-01 9:24 ` marxin at gcc dot gnu.org
2021-09-19 23:01 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-07-01 9:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101204
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|infinite recursion in |[12 Regression] infinite
|gtype-desc.c |recursion in gtype-desc.c
| |since
| |r12-1801-g7036e9ef462fde818
| |1bece4ac4e03f3aa27204dc
Status|UNCONFIRMED |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org
Ever confirmed|0 |1
Last reconfirmed| |2021-07-01
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #1)
> Most likely r12-1801-g7036e9ef462fde8181bece4ac4e03f3aa27204dc
It really started with this revision.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/101204] [12 Regression] infinite recursion in gtype-desc.c since r12-1801-g7036e9ef462fde8181bece4ac4e03f3aa27204dc
2021-06-25 7:39 [Bug c/101204] New: infinite recursion in gtype-desc.c dcb314 at hotmail dot com
` (3 preceding siblings ...)
2021-07-01 9:24 ` [Bug middle-end/101204] [12 Regression] infinite recursion in gtype-desc.c since r12-1801-g7036e9ef462fde8181bece4ac4e03f3aa27204dc marxin at gcc dot gnu.org
@ 2021-09-19 23:01 ` pinskia at gcc dot gnu.org
2021-09-19 23:05 ` pinskia at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-19 23:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101204
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |internal-improvement
Target Milestone|--- |12.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/101204] [12 Regression] infinite recursion in gtype-desc.c since r12-1801-g7036e9ef462fde8181bece4ac4e03f3aa27204dc
2021-06-25 7:39 [Bug c/101204] New: infinite recursion in gtype-desc.c dcb314 at hotmail dot com
` (4 preceding siblings ...)
2021-09-19 23:01 ` pinskia at gcc dot gnu.org
@ 2021-09-19 23:05 ` pinskia at gcc dot gnu.org
2021-09-19 23:13 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-19 23:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101204
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
void
gt_pch_nx (int_hash<location_t,0,UINT_MAX>* x ATTRIBUTE_UNUSED,
ATTRIBUTE_UNUSED gt_pointer_operator op,
ATTRIBUTE_UNUSED void *cookie)
{
gt_pch_nx (&((*x)), op, cookie);
}
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/101204] [12 Regression] infinite recursion in gtype-desc.c since r12-1801-g7036e9ef462fde8181bece4ac4e03f3aa27204dc
2021-06-25 7:39 [Bug c/101204] New: infinite recursion in gtype-desc.c dcb314 at hotmail dot com
` (5 preceding siblings ...)
2021-09-19 23:05 ` pinskia at gcc dot gnu.org
@ 2021-09-19 23:13 ` pinskia at gcc dot gnu.org
2021-11-08 9:58 ` tschwinge at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-19 23:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101204
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
typedef int_hash <location_t, 0, UINT_MAX> xint_hash_t;
typedef hash_map<xint_hash_t, nowarn_spec_t> xint_hash_map_t;
/* A mapping from a 'location_t' to the warning spec set for it. */
extern GTY(()) xint_hash_map_t *nowarn_map;
int_hash has no fields ....
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/101204] [12 Regression] infinite recursion in gtype-desc.c since r12-1801-g7036e9ef462fde8181bece4ac4e03f3aa27204dc
2021-06-25 7:39 [Bug c/101204] New: infinite recursion in gtype-desc.c dcb314 at hotmail dot com
` (6 preceding siblings ...)
2021-09-19 23:13 ` pinskia at gcc dot gnu.org
@ 2021-11-08 9:58 ` tschwinge at gcc dot gnu.org
2021-11-09 12:21 ` cvs-commit at gcc dot gnu.org
2021-11-09 12:29 ` tschwinge at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2021-11-08 9:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101204
Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|msebor at gcc dot gnu.org |tschwinge at gcc dot gnu.org
CC| |tschwinge at gcc dot gnu.org
--- Comment #7 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
As I said in
<http://mid.mail-archive.com/87y28gm6lt.fsf@euler.schwinge.homeip.net>, I do
have a patch that happens to resolve this one -- will send this week.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/101204] [12 Regression] infinite recursion in gtype-desc.c since r12-1801-g7036e9ef462fde8181bece4ac4e03f3aa27204dc
2021-06-25 7:39 [Bug c/101204] New: infinite recursion in gtype-desc.c dcb314 at hotmail dot com
` (7 preceding siblings ...)
2021-11-08 9:58 ` tschwinge at gcc dot gnu.org
@ 2021-11-09 12:21 ` cvs-commit at gcc dot gnu.org
2021-11-09 12:29 ` tschwinge at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-09 12:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101204
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Thomas Schwinge <tschwinge@gcc.gnu.org>:
https://gcc.gnu.org/g:c71cb26a9e841888f52e4bfcaad94c8f8ecb4fdb
commit r12-5047-gc71cb26a9e841888f52e4bfcaad94c8f8ecb4fdb
Author: Thomas Schwinge <thomas@codesourcery.com>
Date: Tue Nov 9 10:55:15 2021 +0100
Get rid of infinite recursion for 'typedef' used with GTY-marked
'gcc/diagnostic-spec.h:nowarn_map' [PR101204, PR103157]
Reproduced with clang version 10.0.0-4ubuntu1:
gtype-desc.c:11333:1: warning: all paths through this function will
call itself [-Winfinite-recursion]
... as well as some GCC's '-O2 -fdump-tree-optimized':
void gt_pch_nx(int_hash<unsigned int, 0u, 4294967295u>*,
gt_pointer_operator, void*) ([...])
{
<bb 2>:
<bb 3>:
goto <bb 3>;
}
That three-arguments 'gt_pch_nx' function as well as two one-argument
'gt_ggc_mx', 'gt_pch_nx' functions now turn empty:
[...]
void
-gt_ggc_mx (int_hash<location_t,0,UINT_MAX>& x_r ATTRIBUTE_UNUSED)
+gt_ggc_mx (struct xint_hash_t& x_r ATTRIBUTE_UNUSED)
{
- int_hash<location_t,0,UINT_MAX> * ATTRIBUTE_UNUSED x = &x_r;
- gt_ggc_mx (&((*x)));
+ struct xint_hash_t * ATTRIBUTE_UNUSED x = &x_r;
}
[...]
void
-gt_pch_nx (int_hash<location_t,0,UINT_MAX>& x_r ATTRIBUTE_UNUSED)
+gt_pch_nx (struct xint_hash_t& x_r ATTRIBUTE_UNUSED)
{
- int_hash<location_t,0,UINT_MAX> * ATTRIBUTE_UNUSED x = &x_r;
- gt_pch_nx (&((*x)));
+ struct xint_hash_t * ATTRIBUTE_UNUSED x = &x_r;
}
[...]
void
-gt_pch_nx (int_hash<location_t,0,UINT_MAX>* x ATTRIBUTE_UNUSED,
+gt_pch_nx (struct xint_hash_t* x ATTRIBUTE_UNUSED,
ATTRIBUTE_UNUSED gt_pointer_operator op,
ATTRIBUTE_UNUSED void *cookie)
{
- gt_pch_nx (&((*x)), op, cookie);
}
[...]
gcc/
PR middle-end/101204
PR other/103157
* diagnostic-spec.h (typedef xint_hash_t): Turn into...
(struct xint_hash_t): ... this.
* doc/gty.texi: Update.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/101204] [12 Regression] infinite recursion in gtype-desc.c since r12-1801-g7036e9ef462fde8181bece4ac4e03f3aa27204dc
2021-06-25 7:39 [Bug c/101204] New: infinite recursion in gtype-desc.c dcb314 at hotmail dot com
` (8 preceding siblings ...)
2021-11-09 12:21 ` cvs-commit at gcc dot gnu.org
@ 2021-11-09 12:29 ` tschwinge at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2021-11-09 12:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101204
Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #9 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
This is now resolved; PR103157 remains open for resolving the actual 'gengtype'
issue.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-11-09 12:29 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-25 7:39 [Bug c/101204] New: infinite recursion in gtype-desc.c dcb314 at hotmail dot com
2021-06-25 8:39 ` [Bug middle-end/101204] " jakub at gcc dot gnu.org
2021-06-25 23:49 ` msebor at gcc dot gnu.org
2021-06-26 7:48 ` dcb314 at hotmail dot com
2021-07-01 9:24 ` [Bug middle-end/101204] [12 Regression] infinite recursion in gtype-desc.c since r12-1801-g7036e9ef462fde8181bece4ac4e03f3aa27204dc marxin at gcc dot gnu.org
2021-09-19 23:01 ` pinskia at gcc dot gnu.org
2021-09-19 23:05 ` pinskia at gcc dot gnu.org
2021-09-19 23:13 ` pinskia at gcc dot gnu.org
2021-11-08 9:58 ` tschwinge at gcc dot gnu.org
2021-11-09 12:21 ` cvs-commit at gcc dot gnu.org
2021-11-09 12:29 ` tschwinge 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).