From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127724 invoked by alias); 22 Sep 2016 12:49:34 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 127713 invoked by uid 89); 22 Sep 2016 12:49:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=BAYES_00,KAM_ASCII_DIVIDERS,KAM_STOCKGEN,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=sk:SYMBOL_ X-HELO: eusmtp01.atmel.com Received: from eusmtp01.atmel.com (HELO eusmtp01.atmel.com) (212.144.249.243) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Sep 2016 12:49:23 +0000 Received: from HNOCHT02.corp.atmel.com (10.145.133.41) by eusmtp01.atmel.com (10.145.145.31) with Microsoft SMTP Server (TLS) id 14.3.235.1; Thu, 22 Sep 2016 14:49:15 +0200 Received: from jaguar.atmel.com (10.145.133.18) by HNOCHT02.corp.atmel.com (10.145.133.41) with Microsoft SMTP Server (TLS) id 14.3.235.1; Thu, 22 Sep 2016 14:49:19 +0200 User-agent: mu4e 0.9.17; emacs 24.5.1 From: Senthil Kumar Selvaraj To: "gcc-patches@gcc.gnu.org" CC: Denis Chertykov Subject: Backport fix for PR 65210 to gcc-5-branch Date: Thu, 22 Sep 2016 12:55:00 -0000 Message-ID: <87fuosaynf.fsf@atmel.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg01539.txt.bz2 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 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 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)));