public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Help needed: GCC4.6.2 armv7 hardfp exception try catch issue
@ 2011-11-07  9:28 Joop Boonen
  2011-11-07 15:35 ` Ian Lance Taylor
  0 siblings, 1 reply; 6+ messages in thread
From: Joop Boonen @ 2011-11-07  9:28 UTC (permalink / raw)
  To: gcc-help

Hi all,

I need some help, to diagnose a problem.
I'm currently looking into an gmp issue.
A few gmp tests fail.

<for example>
make  check-TESTS
make[4]: Entering directory `/usr/src/packages/BUILD/gmp-5.0.2/tests/cxx'
terminate called after throwing an instance of 'std::invalid_argument'
terminate called recursively
/bin/sh: line 5:   333 Aborted                 ${dir}$tst
FAIL: t-assign
</for example>

What I found it that they fail due to a try catch issue.

gmp-5.0.2/tests/cxx/t-assign.cc

  // operator=(const char *) with invalid
  {
    try {
      const char *a = "abc";
      mpz_class b;
      b = a;
      ASSERT_ALWAYS (0);  /* should not be reached */
    } catch (invalid_argument) {
    }
  }

On b = a; the exception is generated. But it's not caught.
I don't know if it's related to g++.
Might this be a bug.

Can someone help, how to diagnose this problem?

Regards,

Joop.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help needed: GCC4.6.2 armv7 hardfp exception try catch issue
  2011-11-07  9:28 Help needed: GCC4.6.2 armv7 hardfp exception try catch issue Joop Boonen
@ 2011-11-07 15:35 ` Ian Lance Taylor
  2011-11-07 19:35   ` Joop Boonen
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Lance Taylor @ 2011-11-07 15:35 UTC (permalink / raw)
  To: Joop Boonen; +Cc: gcc-help

"Joop Boonen" <joop.boonen@boonen.org> writes:

> On b = a; the exception is generated. But it's not caught.

What operating system are you using?  Exactly how did you configure gcc?

What was the exact command line used to compile the file?

Ian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help needed: GCC4.6.2 armv7 hardfp exception try catch issue
  2011-11-07 15:35 ` Ian Lance Taylor
@ 2011-11-07 19:35   ` Joop Boonen
  2011-11-07 20:07     ` Ian Lance Taylor
  0 siblings, 1 reply; 6+ messages in thread
From: Joop Boonen @ 2011-11-07 19:35 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-help

On Mon, November 7, 2011 4:35 pm, Ian Lance Taylor wrote:
> "Joop Boonen" <joop.boonen@boonen.org> writes:
>
>> On b = a; the exception is generated. But it's not caught.
>
> What operating system are you using?  Exactly how did you configure gcc?

I'm using openSuSE ARM.

This is the gcc configuration.
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/armv7l-suse-linux-gnueabi/4.6/lto-wrapper
Target: armv7l-suse-linux-gnueabi
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib
--enable-languages=c,c++,objc,fortran,obj-c++,java
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.6
--enable-ssp --disable-libssp --disable-plugin
--with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--disable-libgcj --disable-libmudflap --with-slibdir=/lib
--with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new
--disable-libstdcxx-pch --enable-version-specific-runtime-libs
--program-suffix=-4.6 --enable-linux-futex --enable-linker-build-id
--with-system-libunwind --with-arch=armv7-a --with-tune=cortex-a9
--with-float=hard --with-mode=thumb --with-abi=aapcs-linux
--with-fpu=vfpv3-d16 --build=armv7l-suse-linux-gnueabi
Thread model: posix
gcc version 4.6.2 (SUSE Linux)

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/armv7l-suse-linux-gnueabi/4.6/lto-wrapper
Target: armv7l-suse-linux-gnueabi
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib
--enable-languages=c,c++,objc,fortran,obj-c++,java
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.6
--enable-ssp --disable-libssp --disable-plugin
--with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--disable-libgcj --disable-libmudflap --with-slibdir=/lib
--with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new
--disable-libstdcxx-pch --enable-version-specific-runtime-libs
--program-suffix=-4.6 --enable-linux-futex --enable-linker-build-id
--with-system-libunwind --with-arch=armv7-a --with-tune=cortex-a9
--with-float=hard --with-mode=thumb --with-abi=aapcs-linux
--with-fpu=vfpv3-d16 --build=armv7l-suse-linux-gnueabi
Thread model: posix
gcc version 4.6.2 (SUSE Linux)

>
> What was the exact command line used to compile the file?

The command line to compile and configure gmp ( http://gmplib.org/ ) are:
CFLAGS='-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
-fasynchronous-unwind-tables -fexceptions'
./configure --prefix=/usr --libdir=/usr/lib --infodir=/usr/share/info
--build=armv7l-suse-linux --enable-cxx --enable-fat --enable-mpbsd

using ABI="standard"
      CC="gcc -std=gnu99"
      CFLAGS="-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-funwind-tables -fasynchronous-unwind-tables -fexceptions"
      CPPFLAGS=""
      CXX="g++"
      CXXFLAGS="-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-funwind-tables -fasynchronous-unwind-tables -fexceptions"
      MPN_PATH=" arm generic"

make 'CFLAGS=-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-funwind-tables -fasynchronous-unwind-tables -fexceptions' -j2

make 'CFLAGS=-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-funwind-tables -fasynchronous-unwind-tables -fexceptions' check

I also tried without :  -funwind-tables -fasynchronous-unwind-tables
This didn't help.

I wonder if the unwind tables are really needed?


>
> Ian
>
Regards,

Joop.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help needed: GCC4.6.2 armv7 hardfp exception try catch issue
  2011-11-07 19:35   ` Joop Boonen
@ 2011-11-07 20:07     ` Ian Lance Taylor
  2011-11-07 21:07       ` Joop Boonen
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Lance Taylor @ 2011-11-07 20:07 UTC (permalink / raw)
  To: Joop Boonen; +Cc: gcc-help

"Joop Boonen" <joop.boonen@boonen.org> writes:

> On Mon, November 7, 2011 4:35 pm, Ian Lance Taylor wrote:
>> "Joop Boonen" <joop.boonen@boonen.org> writes:
>>
>>> On b = a; the exception is generated. But it's not caught.
>>
>> What operating system are you using?  Exactly how did you configure gcc?
>
> I'm using openSuSE ARM.

Thanks for the info.  I don't see the compilation line--how g++ itself
was invoked--but I doubt it matters.  I don't see anything wrong--this
does sound like a bug somewhere bug I don't know where.

Ian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help needed: GCC4.6.2 armv7 hardfp exception try catch issue
  2011-11-07 20:07     ` Ian Lance Taylor
@ 2011-11-07 21:07       ` Joop Boonen
  2011-11-07 21:38         ` Ian Lance Taylor
  0 siblings, 1 reply; 6+ messages in thread
From: Joop Boonen @ 2011-11-07 21:07 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-help

On Mon, November 7, 2011 9:06 pm, Ian Lance Taylor wrote:
> "Joop Boonen" <joop.boonen@boonen.org> writes:
>
>> On Mon, November 7, 2011 4:35 pm, Ian Lance Taylor wrote:
>>> "Joop Boonen" <joop.boonen@boonen.org> writes:
>>>
>>>> On b = a; the exception is generated. But it's not caught.
>>>
>>> What operating system are you using?  Exactly how did you configure
>>> gcc?
>>
>> I'm using openSuSE ARM.
>
> Thanks for the info.  I don't see the compilation line--how g++ itself
> was invoked--but I doubt it matters.  I don't see anything wrong--this
> does sound like a bug somewhere bug I don't know where.


Thank you for your time.

Dirk Müller found the possible cause.
http://repo.or.cz/w/glibc-ports.git/commitdiff/3c6ac5cbe1b17f08bf66be4b1b1c6ffd01729af9

When it's build we can test it.

>
> Ian
>

Regards,

Joop.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help needed: GCC4.6.2 armv7 hardfp exception try catch issue
  2011-11-07 21:07       ` Joop Boonen
@ 2011-11-07 21:38         ` Ian Lance Taylor
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Lance Taylor @ 2011-11-07 21:38 UTC (permalink / raw)
  To: Joop Boonen; +Cc: gcc-help

"Joop Boonen" <joop.boonen@boonen.org> writes:

> On Mon, November 7, 2011 9:06 pm, Ian Lance Taylor wrote:
>> "Joop Boonen" <joop.boonen@boonen.org> writes:
>>
>>> On Mon, November 7, 2011 4:35 pm, Ian Lance Taylor wrote:
>>>> "Joop Boonen" <joop.boonen@boonen.org> writes:
>>>>
>>>>> On b = a; the exception is generated. But it's not caught.
>>>>
>>>> What operating system are you using?  Exactly how did you configure
>>>> gcc?
>>>
>>> I'm using openSuSE ARM.
>>
>> Thanks for the info.  I don't see the compilation line--how g++ itself
>> was invoked--but I doubt it matters.  I don't see anything wrong--this
>> does sound like a bug somewhere bug I don't know where.
>
>
> Thank you for your time.
>
> Dirk Müller found the possible cause.
> http://repo.or.cz/w/glibc-ports.git/commitdiff/3c6ac5cbe1b17f08bf66be4b1b1c6ffd01729af9
>
> When it's build we can test it.

I don't see how that could be the problem, but I'd be happy to be wrong.

Ian

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-11-07 21:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-07  9:28 Help needed: GCC4.6.2 armv7 hardfp exception try catch issue Joop Boonen
2011-11-07 15:35 ` Ian Lance Taylor
2011-11-07 19:35   ` Joop Boonen
2011-11-07 20:07     ` Ian Lance Taylor
2011-11-07 21:07       ` Joop Boonen
2011-11-07 21:38         ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).