On 02/21/2017 09:40 AM, Jakub Jelinek wrote:
Hi!

On the following testcase, we have TYPE_READONLY integer type
before handling the mode attribute and transform it into
a signed char type (without TYPE_READONLY), which causes ICE in the FE,
because it isn't const anymore.

Fixed by making sure we have the same quals as before applying the mode
attribute.  Bootstrapped/regtested on x86_64-linux and i686-linux, ok for
trunk?

2017-02-21  Jakub Jelinek  <ja...@redhat.com>

        PR c++/79641
        * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
        preserve quals.

        * c-c++-common/pr79641.c: New test.
OK.
jeff

Reply via email to