public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Denis Chertykov <chertykov@gmail.com>
To: Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>, Georg Johann Lay <avr@gjlay.de>
Subject: Re: [Patch, avr] Fix PR65210
Date: Fri, 04 Sep 2015 17:37:00 -0000	[thread overview]
Message-ID: <CADOs=zYL1KbHt+0kuM3JhYU2dpxYGQzCd38-FQaSdkFzB+3zWg@mail.gmail.com> (raw)
In-Reply-To: <20150902075154.GB1047@jaguar.corp.atmel.com>

Committed.

2015-09-02 10:51 GMT+03:00 Senthil Kumar Selvaraj
<senthil_kumar.selvaraj@atmel.com>:
> Hi,
>
>   This (rather trivial) patch fixes PR65210. The ICE happens because code
>   wasn't handling io_low attribute where it is supposed to.
>
>   If this is ok, could someone commit please? I don't have commit
>   access.
>
> Regards
> Senthil
>
> gcc/ChangeLog
>
> 2015-09-02  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
>
>         PR target/65210
>         * config/avr/avr.c (avr_eval_addr_attrib): Look for io_low
>         attribute as well.
>
> gcc/testsuite/ChangeLog
>
>         PR target/65210
>         * gcc.target/avr/pr65210.c: New test.
>
> diff --git gcc/config/avr/avr.c gcc/config/avr/avr.c
> index bec9a8b..9f5bc88 100644
> --- gcc/config/avr/avr.c
> +++ gcc/config/avr/avr.c
> @@ -9069,6 +9069,8 @@ avr_eval_addr_attrib (rtx x)
>        if (SYMBOL_REF_FLAGS (x) & SYMBOL_FLAG_IO)
>         {
>           attr = lookup_attribute ("io", DECL_ATTRIBUTES (decl));
> +         if (!attr || !TREE_VALUE (attr))
> +           attr = lookup_attribute ("io_low", DECL_ATTRIBUTES (decl));
>           gcc_assert (attr);
>         }
>        if (!attr || !TREE_VALUE (attr))
> diff --git gcc/testsuite/gcc.target/avr/pr65210.c gcc/testsuite/gcc.target/avr/pr65210.c
> new file mode 100644
> index 0000000..1aed441
> --- /dev/null
> +++ gcc/testsuite/gcc.target/avr/pr65210.c
> @@ -0,0 +1,7 @@
> +/* { dg-do compile } */
> +
> +/* This testcase exposes PR65210. Usage of the io_low attribute
> +   causes assertion failure because code only looks for the io
> +   attribute if SYMBOL_FLAG_IO is set. */
> +
> +volatile char q __attribute__((io_low,address(0x81)));

  reply	other threads:[~2015-09-04 16:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-02  7:52 Senthil Kumar Selvaraj
2015-09-04 17:37 ` Denis Chertykov [this message]
2015-09-08  8:03 ` Georg-Johann Lay
2015-09-08  8:21   ` Senthil Kumar Selvaraj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADOs=zYL1KbHt+0kuM3JhYU2dpxYGQzCd38-FQaSdkFzB+3zWg@mail.gmail.com' \
    --to=chertykov@gmail.com \
    --cc=avr@gjlay.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=senthil_kumar.selvaraj@atmel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).