From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25082 invoked by alias); 23 Oct 2005 22:52:33 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 25062 invoked by uid 48); 23 Oct 2005 22:52:31 -0000 Date: Sun, 23 Oct 2005 22:52:00 -0000 Message-ID: <20051023225231.25061.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/24406] EQUIVALENCE broken in 32-bit code with optimization -O2 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gcc dot gnu dot org" X-SW-Source: 2005-10/txt/msg03063.txt.bz2 List-Id: ------- Comment #5 from pinskia at gcc dot gnu dot org 2005-10-23 22:52 ------- Confirmed, fortran front-end needs to do something similar to the C front-end in c-common.c/c_common_get_alias_set: /* Permit type-punning when accessing a union, provided the access is directly through the union. For example, this code does not permit taking the address of a union member and then storing through it. Even the type-punning allowed here is a GCC extension, albeit a common and useful one; the C standard says that such accesses have implementation-defined behavior. */ for (u = t; TREE_CODE (u) == COMPONENT_REF || TREE_CODE (u) == ARRAY_REF; u = TREE_OPERAND (u, 0)) if (TREE_CODE (u) == COMPONENT_REF && TREE_CODE (TREE_TYPE (TREE_OPERAND (u, 0))) == UNION_TYPE) return 0; -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pinskia at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2005-10-23 22:52:31 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24406