------- Comment #5 from dave at hiauly1 dot hia dot nrc dot ca  2008-11-18 
19:27 -------
Subject: Re:  [4.4 Regression] gcc.dg/tree-ssa/ssa-store-ccp-3.c
scan-tree-dump-times optimized "conststaticvariable" 1

> ------- Comment #4 from sje at cup dot hp dot com  2008-11-18 17:11 -------
> A dg-options to set -fpic would fix the test on hppa64 but I think we might
> want to xfail it instead and fix it after 4.4.  Technically, I don't think 
> this
> is a 4.4 Regression since the test is new and the behaviour of the compiler 
> has
> not changed so we might want to remove the 4.4 Regression tag from this 
> defect.

Agree with 4.4 Regression tag.

With respect to the test, I don't care which fix is selected.  The compiler
behaves as expected, so I believe the PR can be closed when the test is
fixed.

The hppa64 target has always set flag_pic.  The overloading of flag_shlib
on the -fpic/-fPIC options was introduced here:

2003-06-03  Jakub Jelinek  <[EMAIL PROTECTED]>

        * configure.in (HAVE_LD_PIE): Check for ld -pie.
        * config.in: Rebuilt.
        * configure: Rebuilt.
        * toplev.c (flag_pie, flag_shlib): New variables.
        (f_options): Add -fpie and -fPIE.
        (parse_options_and_default_flags): Set flag_pic if -fpie/-fPIE.
        Set flag_shlib if flag_pic and not -fpie/-fPIE.
        ...

As you noted, flag_shlib affects inlining, so we don't want this
enabled by default.  Supplying -fpic on the command line sets flag_shlib
and I believe most people use it when building shared libraries on
hppa64.  Thus, there's no major problem with with setting flag_pic
in override options. 

The documentation indicates that -fpic should be specified to generate
position-independent code (PIC) suitable for use in a shared library.
The documentation also indicates that the code generated for the IBM
RS/6000 is always position-independent.  However, this is not mentioned
for ia64 or hppa64.

Dave


-- 


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

Reply via email to