Re: -flto / -flto-partition=none question on ia64-hp-hpux11.23

2011-02-28 Thread Steve Ellcey
On Sat, 2011-02-26 at 18:45 +0100, Richard Guenther wrote:
> On Sat, Feb 26, 2011 at 12:22 AM, Steve Ellcey  wrote:
> >
> > I am looking at an lto bug on ia64-hp-hpux11.23.  If I compile
> > g++.dg/torture/pr33572.C with -flto on this platform I get:
> >
> > ld: Unsatisfied symbol "__gcc_personality_v0" in file 
> > /var/tmp//ccYlpGzO.ltrans0.ltrans.o
> > 1 errors.
> > collect2: ld returned 1 exit status
> >
> > (This is using the HP linker which I do for all my GCC builds.)
> 
> so you do not have the linker-plugin?

Correct.

> I think this hints at an issue with the collect2 LTO path.  It would
> be interesting
> to see where references to the missing symbols appear / vanish - just look
> at all intermediate files generated.
> 
> Richard.

This is interesting, there seem to be two different variables at play
here.  __gcc_personality_v0 and __gxx_personality_v0.  When I compile
with '-flto -O2' the error I get is about __gcc_personality_v0.  When I
look at the two assembly files created during this compililation I see:

ccG1Elhg.ltrans0.s: .global __gcc_personality_v0#
ccG1Elhg.ltrans0.s: .type   __gcc_personality_v0#, @function
ccG1Elhg.ltrans0.s: .personality__gcc_personality_v0#
pr33572.s:  stringz "\0014__gxx_personality_v0"
pr33572.s:  .global __gxx_personality_v0#
pr33572.s:  .type   __gxx_personality_v0#, @function
pr33572.s:  .personality__gxx_personality_v0#

When I add -flto-partition=none to the compilation, I do not get the
ltrans file and I do not get any reference to __gcc_personality_v0.

I don't think GCC has a __gcc_personality_v0 function, does it?  This is
probably why the linker is complaining, if you declare a function as
external the HP linker will complain even if there are no uses of that
function.  I think the GNU linker would ignore the external declaration
if there are no uses of it.

Steve Ellcey
s...@cup.hp.com





Re: gcc-4.5/4.4: Bug in .subreg1 pass?

2011-02-28 Thread Georg-Johann Lay

Denis Chertykov schrieb:

2011/2/26 Georg-Johann Lay :


Ok, this is the patch I meant:

http://gcc.gnu.org/viewcvs?view=revision&revision=86842

it allows just Pmode in r29:r28 because of some spill failures in PR15417
and PR12017.


It was a stupid workaround.
I think that the problem exists anyway because it's not a port problem.

Denis.


PR41894 is yet another variation of the problem.

Removong the restricting code like so

int
avr_hard_regno_mode_ok (int regno, enum machine_mode mode)
{
  /* Disallow QImode in stack pointer regs.  */
  if ((regno == REG_SP || regno == (REG_SP + 1)) && mode == QImode)
return 0;

-  /* The only thing that can go into registers r28:r29 is a Pmode.  */
-  if (regno == REG_Y && mode == Pmode)
-return 1;
-
-  /* Otherwise disallow all regno/mode combinations that span r28:r29.
-  */
-  if (regno <= (REG_Y + 1) && (regno + GET_MODE_SIZE (mode)) >= (REG_Y 
+ 1))

-return 0;
-
  if (mode == QImode)
return 1;

  /* Modes larger than QImode occupy consecutive registers.  */
  if (regno + GET_MODE_SIZE (mode) > FIRST_PSEUDO_REGISTER)
return 0;

  /* All modes larger than QImode should start in an even register.  */
  return !(regno & 1);
}

leads to correct code.

But I don't understand enough of reload/inerts of fp elimination to 
estimate all undesired side effects.


Maybe someone with more insight in reload can comment on this issue?

Johann


Re: -flto / -flto-partition=none question on ia64-hp-hpux11.23

2011-02-28 Thread Richard Guenther
On Mon, Feb 28, 2011 at 7:22 PM, Steve Ellcey  wrote:
> On Sat, 2011-02-26 at 18:45 +0100, Richard Guenther wrote:
>> On Sat, Feb 26, 2011 at 12:22 AM, Steve Ellcey  wrote:
>> >
>> > I am looking at an lto bug on ia64-hp-hpux11.23.  If I compile
>> > g++.dg/torture/pr33572.C with -flto on this platform I get:
>> >
>> > ld: Unsatisfied symbol "__gcc_personality_v0" in file 
>> > /var/tmp//ccYlpGzO.ltrans0.ltrans.o
>> > 1 errors.
>> > collect2: ld returned 1 exit status
>> >
>> > (This is using the HP linker which I do for all my GCC builds.)
>>
>> so you do not have the linker-plugin?
>
> Correct.
>
>> I think this hints at an issue with the collect2 LTO path.  It would
>> be interesting
>> to see where references to the missing symbols appear / vanish - just look
>> at all intermediate files generated.
>>
>> Richard.
>
> This is interesting, there seem to be two different variables at play
> here.  __gcc_personality_v0 and __gxx_personality_v0.  When I compile
> with '-flto -O2' the error I get is about __gcc_personality_v0.  When I
> look at the two assembly files created during this compililation I see:
>
> ccG1Elhg.ltrans0.s:     .global __gcc_personality_v0#
> ccG1Elhg.ltrans0.s:     .type   __gcc_personality_v0#, @function
> ccG1Elhg.ltrans0.s:     .personality    __gcc_personality_v0#
> pr33572.s:      stringz "\0014__gxx_personality_v0"
> pr33572.s:      .global __gxx_personality_v0#
> pr33572.s:      .type   __gxx_personality_v0#, @function
> pr33572.s:      .personality    __gxx_personality_v0#
>
> When I add -flto-partition=none to the compilation, I do not get the
> ltrans file and I do not get any reference to __gcc_personality_v0.
>
> I don't think GCC has a __gcc_personality_v0 function, does it?  This is
> probably why the linker is complaining, if you declare a function as
> external the HP linker will complain even if there are no uses of that
> function.  I think the GNU linker would ignore the external declaration
> if there are no uses of it.

The gcc_personality is provided by libgcc_s I think, it's what you
get when compiling C code with -fexceptions and install
cleanup handlers.

It seems that LTO comes to the conclusion that the C++ specific
personality is not necessary but the generic one suffices.  But
that should still be provided by the original link libraries.

Richard.

>
> Steve Ellcey
> s...@cup.hp.com
>
>
>
>


Re: -flto / -flto-partition=none question on ia64-hp-hpux11.23

2011-02-28 Thread Steve Ellcey
On Mon, 2011-02-28 at 23:56 +0100, Richard Guenther wrote:

> The gcc_personality is provided by libgcc_s I think, it's what you
> get when compiling C code with -fexceptions and install
> cleanup handlers.
> 
> It seems that LTO comes to the conclusion that the C++ specific
> personality is not necessary but the generic one suffices.  But
> that should still be provided by the original link libraries.
> 
> Richard.

The libgcc_s on the ia64-hp-hpux* platform, at least when built using
the system unwind library, does not have a gcc personality function and
so far it has not needed one.  It seems odd that LTO would choose to use
a C personality function on a fully C++ program.  Is there someway I can
override that and force LTO to use the C++ personality function on C++
programs?

It looks like this is coming from lto_eh_personality in lto.c through
the use of lhd_gcc_personality.

Steve Ellcey
s...@cup.hp.com



Re: how can I write a right V32QI Unpack Low Data insn pattern?

2011-02-28 Thread Ian Lance Taylor
Liu  writes:

> I write a v16hi mode Unpack Low Data insn pattern and it is OK. v8si
> and v4di modes are OK, too.
> But the v32qi mode Unpack Low Data insn pattern get error like:
> ../../gcc-4.5.1/gcc/config/mips/hr.md:509: error: expected identifier
> or ‘(’ before ‘goto’
> ../../gcc-4.5.1/gcc/config/mips/hr.md:511: error: expected ‘=’, ‘,’,
> ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
> anyone will tell me what's wrong with my code?

Looks like something in a .h file has #define'd something that your .md
file is using.  I can't tell what it is from the code fragment here.  If
it's not obvious, you are going to have to look at the generated file,
and possibly even the preprocessed version of the generated file.

Ian


Re: Triplet for ARM Linux HardFP ABI, again

2011-02-28 Thread Steve Langasek
Here is an amended patch that handles Ada as EABI-only on ARM.

Are there any other comments on the appropriateness of this globbing change?

Thanks,
-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developerhttp://www.debian.org/
slanga...@ubuntu.com vor...@debian.org

diff --git a/configure b/configure
index 501c6ff..43ff04f 100755
--- a/configure
+++ b/configure
@@ -3236,7 +3236,7 @@ case "${target}" in
 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
 libgloss_dir=arm
 ;;
-  arm*-*-linux-gnueabi)
+  arm*-*-linux-*eabi*)
 noconfigdirs="$noconfigdirs target-qthreads"
 case ${with_newlib} in
   no) noconfigdirs="$noconfigdirs target-newlib target-libgloss"
diff --git a/configure.ac b/configure.ac
index 9121d65..e1a42e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -682,7 +682,7 @@ case "${target}" in
 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
 libgloss_dir=arm
 ;;
-  arm*-*-linux-gnueabi)
+  arm*-*-linux-*eabi*)
 noconfigdirs="$noconfigdirs target-qthreads"
 case ${with_newlib} in
   no) noconfigdirs="$noconfigdirs target-newlib target-libgloss"
diff --git a/gcc/ada/gcc-interface/Makefile.in 
b/gcc/ada/gcc-interface/Makefile.in
index b64ba55..7559efb 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -1841,7 +1841,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(arch) 
$(osys))),)
   LIBRARY_VERSION := $(LIB_VERSION)
 endif
 
-ifeq ($(strip $(filter-out arm% linux-gnueabi,$(arch) $(osys)-$(word 
4,$(targ,)
+ifeq ($(strip $(filter-out arm% linux-%eabi%,$(arch) $(osys))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads
 //
diff --git 
a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc 
b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc
index d71c012..1086a18 100644
--- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc
+++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc
@@ -1,5 +1,5 @@
 // { dg-options "-std=gnu++0x -funsigned-char -fshort-enums" }
-// { dg-options "-std=gnu++0x -funsigned-char -fshort-enums 
-Wl,--no-enum-size-warning" { target arm*-*-linux*eabi } }
+// { dg-options "-std=gnu++0x -funsigned-char -fshort-enums 
-Wl,--no-enum-size-warning" { target arm*-*-linux-*eabi* } }
 
 // 2007-05-03  Benjamin Kosnik  
 //
-- 
1.7.1



signature.asc
Description: Digital signature


Re: -flto / -flto-partition=none question on ia64-hp-hpux11.23

2011-02-28 Thread Richard Henderson
On 03/01/2011 09:27 AM, Steve Ellcey wrote:
> The libgcc_s on the ia64-hp-hpux* platform, at least when built using
> the system unwind library, does not have a gcc personality function and
> so far it has not needed one.

How is that possible?  Do any of the gcc.dg/cleanup-*.c tests work?


r~


Re: -flto / -flto-partition=none question on ia64-hp-hpux11.23

2011-02-28 Thread Steve Ellcey
On Tue, 2011-03-01 at 10:14 +1000, Richard Henderson wrote:
> On 03/01/2011 09:27 AM, Steve Ellcey wrote:
> > The libgcc_s on the ia64-hp-hpux* platform, at least when built using
> > the system unwind library, does not have a gcc personality function and
> > so far it has not needed one.
> 
> How is that possible?  Do any of the gcc.dg/cleanup-*.c tests work?
> 
> 
> r~

Ah, it looks like they have been skipped.

cleanup-12.c:/* { dg-skip-if "" { "ia64-*-hpux11.*" }  { "*" } { "" } } */
cleanup-13.c:/* { dg-skip-if "" { "ia64-*-hpux11.*" }  { "*" } { "" } } */
cleanup-5.c:/* { dg-skip-if "" { "ia64-*-hpux11.*" }  { "*" } { "" } } */

Looks like I added this to cleanup-5.c back in 2005 (PR 20095).

Steve Ellcey
s...@cup.hp.com




Re: Triplet for ARM Linux HardFP ABI, again

2011-02-28 Thread Guillem Jover
Hi!

On Mon, 2011-02-28 at 16:12:32 -0800, Steve Langasek wrote:
> Here is an amended patch that handles Ada as EABI-only on ARM.

> diff --git a/gcc/ada/gcc-interface/Makefile.in 
> b/gcc/ada/gcc-interface/Makefile.in
> index b64ba55..7559efb 100644
> --- a/gcc/ada/gcc-interface/Makefile.in
> +++ b/gcc/ada/gcc-interface/Makefile.in
> @@ -1841,7 +1841,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(arch) 
> $(osys))),)
>LIBRARY_VERSION := $(LIB_VERSION)
>  endif
>  
> -ifeq ($(strip $(filter-out arm% linux-gnueabi,$(arch) $(osys)-$(word 
> 4,$(targ,)
> +ifeq ($(strip $(filter-out arm% linux-%eabi%,$(arch) $(osys))),)
>LIBGNAT_TARGET_PAIRS = \
>a-intnam.adss-inmaop.adb