From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19690 invoked by alias); 11 Nov 2005 08:59:32 -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 19671 invoked by uid 48); 11 Nov 2005 08:59:30 -0000 Date: Fri, 11 Nov 2005 08:59:00 -0000 Message-ID: <20051111085930.19670.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug inline-asm/23200] [4.0/4.1 regression] rejects "i"(&var + 1) In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "bonzini at gcc dot gnu dot org" X-SW-Source: 2005-11/txt/msg01576.txt.bz2 List-Id: ------- Comment #11 from bonzini at gcc dot gnu dot org 2005-11-11 08:59 ------- Could the patch to lower pointer arithmetic to array arithmetic help? typedef int int_array[]; typedef int_array *p_int_array; int var; void f() { asm volatile ("" :: "i"(&(*(p_int_array)&var)[1])); } does not work too, but it looks like if the compiler did this lowering, it would be valid GIMPLE and there would be no need to create the temporary. And this would be doable at -O0 too. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23200