From patchwork Thu Sep 22 12:48:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Senthil Kumar Selvaraj X-Patchwork-Id: 673365 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sfxCY054Rz9t1C for ; Thu, 22 Sep 2016 22:49:43 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=gVcjT1j4; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=JL94rTWgUF0xRzHPUDkuFtjJXmTAbsyEV20jDw6Zy6PVe2vJ2X l4fkpzn4HmkndxNJS6iJhq8HTkhwX3j0CiFoY52CkZ/2PZF3Oqcutlx9F3AOeVax 4HhK/RKDzd2Zz0Ca8CNIzmVXv4uo5G2/RaWmpXNiPsa38LitLMLemt5Uo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; s= default; bh=VMnmsJHkfAeA+pweGdssIj5wr9g=; b=gVcjT1j4ISWjT16sQqYX BdNzOquVCSzvZvZfNt6VFU69w7myL1uVKoreeT/2xSAAgzdiblqPqzjR9FTmCFuj aE6bYSXKLYYJGPqXpKY5inE4Ua4KxZRKcwpGfqVuctCmGO2/6E7DKIEB90HITQ3U LhasHIz3t0TqlOhpnApTkoI= 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-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@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 18:18:20 +0530 Message-ID: <87fuosaynf.fsf@atmel.com> MIME-Version: 1.0 X-IsSubscribed: yes 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)));