optimization/5959: __attribute__((pure)) ignored on PowerPC AIX

Zoltan Hidvegi hzoli@austin.ibm.com
Wed Mar 13 23:56:00 GMT 2002


>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:



More information about the Gcc-bugs mailing list