[32/77] Check is_a <scalar_int_mode> before calling valid_pointer_mode
authorRichard Sandiford <richard.sandiford@linaro.org>
Wed, 30 Aug 2017 11:12:55 +0000 (11:12 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 30 Aug 2017 11:12:55 +0000 (11:12 +0000)
commite05c94bad29dd443cc28ae314e2874992afce348
tree464c6084aa6d986120de2dce326c3955b27fde13
parent1e047eedb4c116f861f9d781b0a36821084242ef
[32/77] Check is_a <scalar_int_mode> before calling valid_pointer_mode

A future patch will make valid_pointer_mode take a scalar_int_mode
instead of a machine_mode.  is_a <...> rather than as_a <...> is
needed here because we're checking a mode supplied by the user.

2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/c-family/
* c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
before calling targetm.addr_space.valid_pointer_mode.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r251484
gcc/c-family/ChangeLog
gcc/c-family/c-attribs.c