https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89530

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|wrong-debug                 |

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm, there's not really anything "wrong" I think.  It is simply we're eliding
static storage initialization and inspecting memory contents from a debugger
is sensitive to dead code removal.

There doesn't seem to be a way to tell a consumer that storage is
"optimized out" when it is in fact still there.  Here at -Og we fail
to elide l_1404 completely but manage to prune the initializer
to only cover the read values at [0][7].

Not sure if DCE which does

--- t.c.036t.dse1       2019-03-25 15:37:19.556994432 +0100
+++ t.c.037t.cddce1     2019-03-25 15:37:19.556994432 +0100
@@ -56,10 +56,6 @@
   [t.c:7:5] # DEBUG BEGIN_STMT
   [t.c:8:5] # DEBUG BEGIN_STMT
   [t.c:8:20] MEM[(short unsigned int[3][9] *)&l_1404 + 8B] = {};
-  [t.c:8:20] l_1404[0][0] = 58143;
-  [t.c:8:20] l_1404[0][1] = 8;
-  [t.c:8:20] l_1404[0][2] = 5;
-  [t.c:8:20] l_1404[0][3] = 80;
   [t.c:9:5] # DEBUG BEGIN_STMT
   [t.c:9:5] goto <bb 9>; [INV]


could somehow "fix" this.

Reply via email to