* [Bug tree-optimization/108449] [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1512
2023-01-18 18:22 [Bug c/108449] New: [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1512 gscfq@t-online.de
@ 2023-01-18 19:14 ` pinskia at gcc dot gnu.org
2023-01-19 7:43 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-01-18 19:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108449
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.0
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2023-01-18
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=106866
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The assert that is being hit was added by r13-2518-ga262f969d6fd93 .
Confirmed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/108449] [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1512
2023-01-18 18:22 [Bug c/108449] New: [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1512 gscfq@t-online.de
2023-01-18 19:14 ` [Bug tree-optimization/108449] " pinskia at gcc dot gnu.org
@ 2023-01-19 7:43 ` rguenth at gcc dot gnu.org
2023-01-19 7:46 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-01-19 7:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108449
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK, so early we still have vfork() 'static' and maybe_special_function_p
returns false. But then check_global_declaration () comes along and does
/* Warn about any function declared static but not defined. We don't
warn about variables, because many programs have static variables
that exist only to get some text into the object file. */
if (TREE_CODE (decl) == FUNCTION_DECL
&& DECL_INITIAL (decl) == 0
&& DECL_EXTERNAL (decl)
&& ! DECL_ARTIFICIAL (decl)
&& ! TREE_PUBLIC (decl))
{
if (warning_suppressed_p (decl, OPT_Wunused))
;
else if (snode->referred_to_p (/*include_self=*/false))
pedwarn (input_location, 0, "%q+F used but never defined", decl);
else
warning (OPT_Wunused_function, "%q+F declared %<static%> but never "
"defined", decl);
/* This symbol is effectively an "extern" declaration now. */
TREE_PUBLIC (decl) = 1;
which will result in maybe_special_function_p to return true.
I suppose leaving the decl static might have an effect on the linker errors
emitted for targets that require special asm ops for undefined external
references, but then you should still get an error here.
This mangling dates back to RMS at r0-3845-g7d429c41c5953f
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/108449] [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1512
2023-01-18 18:22 [Bug c/108449] New: [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1512 gscfq@t-online.de
2023-01-18 19:14 ` [Bug tree-optimization/108449] " pinskia at gcc dot gnu.org
2023-01-19 7:43 ` rguenth at gcc dot gnu.org
@ 2023-01-19 7:46 ` rguenth at gcc dot gnu.org
2023-01-23 7:27 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-01-19 7:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108449
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/108449] [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1512
2023-01-18 18:22 [Bug c/108449] New: [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1512 gscfq@t-online.de
` (2 preceding siblings ...)
2023-01-19 7:46 ` rguenth at gcc dot gnu.org
@ 2023-01-23 7:27 ` cvs-commit at gcc dot gnu.org
2023-01-23 7:28 ` rguenth at gcc dot gnu.org
2023-01-25 9:20 ` marxin at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-01-23 7:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108449
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:106f99406312d7ed47434de53c180718225ffa5e
commit r13-5285-g106f99406312d7ed47434de53c180718225ffa5e
Author: Richard Biener <rguenther@suse.de>
Date: Thu Jan 19 08:44:25 2023 +0100
tree-optimization/108449 - keep maybe_special_function_p behavior
When we have a static declaration without definition we diagnose
that and turn it into an extern declaration. That can alter
the outcome of maybe_special_function_p here and there's really
no point in doing that, so don't.
PR tree-optimization/108449
* cgraphunit.cc (check_global_declaration): Do not turn
undefined statics into externs.
* gcc.dg/pr108449.c: New testcase.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/108449] [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1512
2023-01-18 18:22 [Bug c/108449] New: [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1512 gscfq@t-online.de
` (3 preceding siblings ...)
2023-01-23 7:27 ` cvs-commit at gcc dot gnu.org
@ 2023-01-23 7:28 ` rguenth at gcc dot gnu.org
2023-01-25 9:20 ` marxin at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-01-23 7:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108449
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/108449] [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1512
2023-01-18 18:22 [Bug c/108449] New: [13 Regression] ICE in eliminate_unnecessary_stmts, at tree-ssa-dce.cc:1512 gscfq@t-online.de
` (4 preceding siblings ...)
2023-01-23 7:28 ` rguenth at gcc dot gnu.org
@ 2023-01-25 9:20 ` marxin at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2023-01-25 9:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108449
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=108511
--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Caused: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108511
^ permalink raw reply [flat|nested] 7+ messages in thread