This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
optimization/5959: __attribute__((pure)) ignored on PowerPC AIX
- From: Zoltan Hidvegi <hzoli at austin dot ibm dot com>
- To: gcc-gnats at gcc dot gnu dot org
- Date: Thu, 14 Mar 2002 01:50:42 -0600
- Subject: optimization/5959: __attribute__((pure)) ignored on PowerPC AIX
>Number: 5959
>Category: optimization
>Synopsis: __attribute__((pure)) ignored on PowerPC AIX
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: pessimizes-code
>Submitter-Id: net
>Arrival-Date: Wed Mar 13 23:56:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Zoltan Hidvegi
>Release: 3.0.3 20011211 (prerelease)
>Organization:
>Environment:
System: AIX vlad 3 4 0005BA2F4C00
host: powerpc-ibm-aix4.3.3.0
build: powerpc-ibm-aix4.3.3.0
target: powerpc-ibm-aix4.3.3.0
configured with: ../gcc/configure --prefix=<prefix> --with-local-prefix=<prefix> --enable-languages=c,c++,java --enable-version-specific-runtime-libs --disable-nls --disable-shared
>Description:
Looking at the assembly listing generated by gcc it seems that
__attributed__((pure)) is ignored on PowerPC AIX, while the same code
works on Intel Linux. The sample code below calls foo twice on AIX
but only once on Linux.
>How-To-Repeat:
int foo(int) __attribute__((pure));
int
twice_foo(int i)
{
return foo(i) + foo(i);
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: