http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46488

           Summary: server/core_filters.c from apache httpd 2.2.17 does
                    not produce good code with optimizations (-O) used on
                    Solaris Sparc 64-bit
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: lk0...@att.com


Created attachment 22403
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22403
Preprocessed server/core_filters.c

Compiling the latest Apache httpd (2.2.17) using GCC 4.5.1 on Solaris Sparc and
64-bit produces a non-functioning web server.

Attempts to connect to httpd result in an immediate hang-up with no logs.

Recompiling server/core_filters.c without -O[2,3] produces a working httpd.

GCC was built with the following options:
../configure --with-gnu-as --with-as=/sites/compiler/bin/as \
        --without-gnu-ld \
        --with-ld=/usr/ccs/bin/ld \
        --enable-shared --enable-languages=c,c++ \
        --with-gmp=/sites/compiler/64bit --with-mpfr=/sites/compiler/64bit \
        --prefix=/sites/compiler/64bit \
        --build=sparc64-sun-solaris2.10

GNU C (GCC) version 4.5.1 (sparc64-sun-solaris2.10)
        compiled by GNU C version 4.5.1, GMP version 4.3.2, MPFR version 2.4.2,
MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072

There are no compiler warnings when compiling httpd.

httpd configure command:

./configure --prefix=/sites/httpd-2.2.17-worker-niagara-64
--enable-mods-shared=all --with-mpm=worker --enable-logio --enable-headers
--disable-autoindex --enable-cgi --disable-userdir --enable-so --enable-ssl
--disable-ipv6 --with-ssl=/sites/OPENSSL/openssl-1.0.0-niagara-64 --enable-info
--enable-nonportable-atomics=yes --enable-deflate --enable-unique-id
--with-pcre=/sites/utils --enable-proxy --build=sparc64-sun-solaris2.10
CFLAGS are:
CFLAGS='-m64 -mcpu=niagara -mtune=niagara -O3'

Pre-processed file is attached.

Reply via email to