From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16336 invoked by alias); 9 Dec 2015 07:30:00 -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 16323 invoked by uid 89); 9 Dec 2015 07:30:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 09 Dec 2015 07:29:59 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 0478B541356; Wed, 9 Dec 2015 08:29:55 +0100 (CET) Date: Wed, 09 Dec 2015 07:30:00 -0000 From: Jan Hubicka To: Eric Botcazou Cc: Jan Hubicka , gcc-patches@gcc.gnu.org, rguenther@suse.de Subject: Re: -fstrict-aliasing fixes 5/6: make type system independent of flag_strict_aliasing Message-ID: <20151209072955.GA8345@kam.mff.cuni.cz> References: <20151202080716.GV5527@kam.mff.cuni.cz> <4833565.b9m1IQmy3c@polaris> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4833565.b9m1IQmy3c@polaris> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2015-12/txt/msg00952.txt.bz2 Hi this patch implements the trik for punting if we get too many nested pointers. This fixes the ada tstcases. Curiously enough I would like to replace safe_push by quick_push but doing so I get weird error about freeing non-heap object in the auto_vec desructor... Bootstraping/regtesting x86_64-linux. Ok if it passes? Honza * alias.c (get_alias_set): Punt after getting 8 nested pointers. Index: alias.c =================================================================== --- alias.c (revision 231439) +++ alias.c (working copy) @@ -990,6 +990,14 @@ get_alias_set (tree t) || TREE_CODE (p) == VECTOR_TYPE; p = TREE_TYPE (p)) { + /* Ada supports recusive pointers. Instead of doing recrusion check + just give up once the preallocated space of 8 elements is up. + In this case just punt to void * alias set. */ + if (reference.length () == 8) + { + p = ptr_type_node; + break; + } if (TREE_CODE (p) == REFERENCE_TYPE) /* In LTO we want languages that use references to be compatible with languages that use pointers. */