From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 37F2B3858404; Mon, 8 Jan 2024 11:30:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 37F2B3858404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704713452; bh=fEMJvvNQcSffaejWP6C6rogQEP40YQngsBmeicVUc+k=; h=From:To:Subject:Date:In-Reply-To:References:From; b=seNvQjPrMh0MEEC+QQtxLjHk4bpubJqM5XpcKvFWof8vv2Nqpo+OF3S09QbClKiP6 91EKbBV3JOIGF072OCWlT6uougqXgRxc9MOhuX3i9Q4Nry2MNJavyPzAB/yzCKL5ZQ +JA5ELDOh5VDf/ueRbLISwYh/VI/w6ze4O9aci/w= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/112952] avr: attribute address not working with -fdata-sections -fno-common Date: Mon, 08 Jan 2024 11:30:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112952 --- Comment #2 from GCC Commits --- The master branch has been updated by Georg-Johann Lay : https://gcc.gnu.org/g:c131b1d5da412b9b0f0681fc5704cdc9b7cafb04 commit r14-6999-gc131b1d5da412b9b0f0681fc5704cdc9b7cafb04 Author: Georg-Johann Lay Date: Mon Jan 8 12:20:45 2024 +0100 AVR: PR target/112952: Fix attribute "address", "io" and "io_low" so they work with all combinations of -f[no-]data-sections -f[no-]commo= n. The patch also improves some diagnostics and adds additional checks, for example these attributes must only be applied to variables in static storage. gcc/ PR target/112952 * config/avr/avr.cc (avr_handle_addr_attribute): Also print val= id range when diagnosing attribute "io" and "io_low" are out of ra= nge. (avr_eval_addr_attrib): Don't ICE on empty address at that plac= e. (avr_insert_attributes): Reject if attribute "address", "io" or "io_low" in contexts other than static storage. (avr_asm_output_aligned_decl_common): Move output of decls with attribute "address", "io", and "io_low" to... (avr_output_addr_attrib): ...this new function. (avr_asm_asm_output_aligned_bss): Remove output for decls with attribute "address", "io", and "io_low". (avr_encode_section_info): Rectify handling of decls with attri= bute "address", "io", and "io_low". gcc/testsuite/ PR target/112952 * gcc.target/avr/attribute-io.h: New file. * gcc.target/avr/pr112952-0.c: New test. * gcc.target/avr/pr112952-1.c: New test. * gcc.target/avr/pr112952-2.c: New test. * gcc.target/avr/pr112952-3.c: New test.=