diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2018-09-12 06:50:34 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2018-09-12 06:50:34 +0000 |
commit | bb753cad995b2a0f98a566cc710feef45e1b46b3 (patch) | |
tree | 6fafa45e2ef5412aecfdf9961573a47a5a8a28fc /gcc | |
parent | be673084415f916ef541b89d4d7c10c66879ae29 (diff) | |
download | gcc-bb753cad995b2a0f98a566cc710feef45e1b46b3.zip gcc-bb753cad995b2a0f98a566cc710feef45e1b46b3.tar.gz gcc-bb753cad995b2a0f98a566cc710feef45e1b46b3.tar.bz2 |
* gimple-ssa-warn-alloca.c
(alloca_type_and_limit::alloca_type_and_limit): Initialize limit
field for ALLOCA_BOUND_*_LARGE.
From-SVN: r264227
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/gimple-ssa-warn-alloca.c | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 17aa2a1..f5468ca 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-09-12 Aldy Hernandez <aldyh@redhat.com> + + * gimple-ssa-warn-alloca.c + (alloca_type_and_limit::alloca_type_and_limit): Initialize limit + field for ALLOCA_BOUND_*_LARGE. + 2018-09-11 Nathan Sidwell <nathan@acm.org> * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'. diff --git a/gcc/gimple-ssa-warn-alloca.c b/gcc/gimple-ssa-warn-alloca.c index 4d5aed8..d1b1de4 100644 --- a/gcc/gimple-ssa-warn-alloca.c +++ b/gcc/gimple-ssa-warn-alloca.c @@ -128,7 +128,11 @@ struct alloca_type_and_limit { alloca_type_and_limit (); alloca_type_and_limit (enum alloca_type type, wide_int i) : type(type), limit(i) { } - alloca_type_and_limit (enum alloca_type type) : type(type) { } + alloca_type_and_limit (enum alloca_type type) : type(type) + { if (type == ALLOCA_BOUND_MAYBE_LARGE + || type == ALLOCA_BOUND_DEFINITELY_LARGE) + limit = wi::to_wide (integer_zero_node); + } }; /* Return the value of the argument N to -Walloca-larger-than= or |