From patchwork Tue Jul 20 16:18:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 59340 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]) by ozlabs.org (Postfix) with SMTP id 2DFB3B6EED for ; Wed, 21 Jul 2010 02:16:17 +1000 (EST) Received: (qmail 28124 invoked by alias); 20 Jul 2010 16:16:14 -0000 Received: (qmail 28113 invoked by uid 22791); 20 Jul 2010 16:16:13 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 20 Jul 2010 16:16:07 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6KGG573018148 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 20 Jul 2010 12:16:05 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6KGG4XU024743 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 Jul 2010 12:16:05 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id o6KGI6C6028092; Tue, 20 Jul 2010 18:18:06 +0200 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id o6KGI6HV028090; Tue, 20 Jul 2010 18:18:06 +0200 Date: Tue, 20 Jul 2010 18:18:06 +0200 From: Jakub Jelinek To: Richard Guenther Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] Testcase for the recent vt_expand_*loc max depth change Message-ID: <20100720161806.GD19172@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) X-IsSubscribed: yes 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 Hi! Here is a testcase that failed before the var-tracking.c fix from today and succeeds now (tested on x86_64-linux and i686-linux). Ok for trunk? 2010-07-20 Jakub Jelinek * gcc.dg/guality/asm-1.c: New test. Jakub --- gcc/testsuite/gcc.dg/guality/asm-1.c.jj 2010-07-20 16:42:34.000000000 +0200 +++ gcc/testsuite/gcc.dg/guality/asm-1.c 2010-07-20 16:49:09.000000000 +0200 @@ -0,0 +1,25 @@ +/* { dg-do run } */ +/* { dg-options "-g" } */ + +struct A { int x; unsigned short y; char z[64]; }; + +void __attribute__((noinline)) +foo (struct A *p, char *q) +{ + int f = &p->z[p->y] - q; + asm volatile ("nop"); + asm volatile ("nop" : : "g" (f)); /* { dg-final { gdb-test 12 "f" "14" } } */ + asm volatile ("" : : "g" (p), "g" (q)); +} + +int +main () +{ + struct A a; + __builtin_memset (&a, 0, sizeof a); + a.y = 26; + a.x = 12; + asm volatile ("" : : "r" (&a) : "memory"); + foo (&a, &a.z[a.x]); + return 0; +}