diff options
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 4eb0265..6d1606c 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -4687,11 +4687,14 @@ static priority_type get_priority (tree args, bool is_destructor) { HOST_WIDE_INT pri; + tree arg; if (!args) return DEFAULT_INIT_PRIORITY; - - if (!host_integerp (TREE_VALUE (args), /*pos=*/0)) + + arg = TREE_VALUE (args); + if (!host_integerp (arg, /*pos=*/0) + || !INTEGRAL_TYPE_P (TREE_TYPE (arg))) goto invalid; pri = tree_low_cst (TREE_VALUE (args), /*pos=*/0); |