aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2010-02-24 11:50:13 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2010-02-24 11:50:13 +0100
commit2e9577924bd1cbae69099af99b85b136d32f5b32 (patch)
tree3fbf67a8580b2d9b9b396119085e3e49b72754a6 /gcc/gimplify.c
parent12a54f548bbf2111653d8d0ad018908c6d2c1f7b (diff)
downloadgcc-2e9577924bd1cbae69099af99b85b136d32f5b32.zip
gcc-2e9577924bd1cbae69099af99b85b136d32f5b32.tar.gz
gcc-2e9577924bd1cbae69099af99b85b136d32f5b32.tar.bz2
re PR debug/43150 (Proper debug info for debugging VLAs)
PR debug/43150 * gimplify.c (gimplify_type_sizes): Clear DECL_IGNORED_P for VLA bounds even for -O+. * var-tracking.c (track_expr_p): If !need_rtl, don't mandate expr needs to have DECL_NAME set. * gcc.dg/guality/vla-1.c: New test. From-SVN: r157032
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 618e3a6..1838747 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -7367,9 +7367,10 @@ gimplify_type_sizes (tree type, gimple_seq *list_p)
/* These types may not have declarations, so handle them here. */
gimplify_type_sizes (TREE_TYPE (type), list_p);
gimplify_type_sizes (TYPE_DOMAIN (type), list_p);
- /* When not optimizing, ensure VLA bounds aren't removed. */
- if (!optimize
- && TYPE_DOMAIN (type)
+ /* Ensure VLA bounds aren't removed, for -O0 they should be variables
+ with assigned stack slots, for -O1+ -g they should be tracked
+ by VTA. */
+ if (TYPE_DOMAIN (type)
&& INTEGRAL_TYPE_P (TYPE_DOMAIN (type)))
{
t = TYPE_MIN_VALUE (TYPE_DOMAIN (type));