This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/36639] pointer referenced in asm statement not regarded as VUSE
- From: "pinskia at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jun 2008 03:46:23 -0000
- Subject: [Bug inline-asm/36639] pointer referenced in asm statement not regarded as VUSE
- References: <bug-36639-334@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gmail dot com 2008-06-26 03:46 -------
Subject: Re: New: pointer referenced in asm statement not regarded as VUSE
This is correct as you are just using the address and not the contents
itself. This is how inline-asm is documented to work also.
-- Andrew Pinski
Sent from my iPhone
On Jun 25, 2008, at 19:08, "aoliva at gcc dot gnu dot org"
<gcc-bugzilla@gcc.gnu.org
> wrote:
> This is originally derived from code from Linux, in which the
> physical address
> of a structure is passed to an asm statement as an integral type,
> causing the
> initializer of the structure to be optimized away.
>
> int main() { int i = 0x12345678; long j = (long)&i; asm ("# %0" : :
> "r" (j)); }
>
> int main() { int i = 0x12345678; void *j = &i; asm ("#" : :
> "p" (j)); }
>
> At the very least in the second case above, the compiler should mark
> the asm
> statement as a VUSE of i. Arguably, it should do so in the former
> case as
> well, like it does for pointers passed to function calls as integral
> types.
>
>
> --
> Summary: pointer referenced in asm statement not regarded
> as VUSE
> Product: gcc
> Version: 4.3.1
> Status: UNCONFIRMED
> Severity: normal
> Priority: P3
> Component: inline-asm
> AssignedTo: unassigned at gcc dot gnu dot org
> ReportedBy: aoliva at gcc dot gnu dot org
> GCC build triplet: *-*-*
> GCC host triplet: *-*-*
> GCC target triplet: *-*-*
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36639
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36639