public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: Denis Chertykov <chertykov@gmail.com>
Subject: Backport fix for PR 65210 to gcc-5-branch
Date: Thu, 22 Sep 2016 12:55:00 -0000	[thread overview]
Message-ID: <87fuosaynf.fsf@atmel.com> (raw)

Hi,

  Is it ok to backport PR 65210 to gcc-5-branch? The patch is already in
  6.x and trunk.

Regards
Senthil

gcc/ChangeLog

2016-09-22  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

	Backport from trunk r227496

	PR target/65210
	* config/avr/avr.c (avr_eval_addr_attrib): Look for io_low
	attribute as well.

gcc/testsuite/ChangeLog

2016-09-22  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

	Backport from trunk r227496

	PR target/65210
	* gcc.target/avr/pr65210.c: New test.

Index: gcc/config/avr/avr.c
===================================================================
--- gcc/config/avr/avr.c	(revision 240340)
+++ gcc/config/avr/avr.c	(working copy)
@@ -9122,6 +9122,8 @@
       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))
       Index: gcc/testsuite/gcc.target/avr/pr65210.c
===================================================================
--- gcc/testsuite/gcc.target/avr/pr65210.c	(nonexistent)
+++ gcc/testsuite/gcc.target/avr/pr65210.c	(working copy)
@@ -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:[~2016-09-22 12:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22 12:55 Senthil Kumar Selvaraj [this message]
2016-09-26 12:45 ` [Patch, avr] " Senthil Kumar Selvaraj
2016-09-26 20:17   ` Denis Chertykov

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=87fuosaynf.fsf@atmel.com \
    --to=senthil_kumar.selvaraj@atmel.com \
    --cc=chertykov@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).