public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/55780] New: effective targets arm_arch_v*_multilib are not strict enough
@ 2012-12-21 18:58 janis at gcc dot gnu.org
  2013-01-02 12:17 ` [Bug testsuite/55780] " gretay at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: janis at gcc dot gnu.org @ 2012-12-21 18:58 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55780
           Summary: effective targets arm_arch_v*_multilib are not strict
                    enough
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: janis@gcc.gnu.org
                CC: rearnsha@arm.com
            Target: arm


The arm_arch_v*_multilib effective targets check that a minimal C program will
execute when compiled for a particular ARM processor, but the test used is an
empty program and the tests that use those checks have more complicated code. 
All of the effective target checks pass using the gdb arm simulator or QEMU,
but some of the ftest-*.c tests then get illegal instructions or hang.

Checks for the ability to run programs on particular hardware should include
code that will only run on that hardware, as is done for effective target whose
keywords end in "_hw_available".


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

* [Bug testsuite/55780] effective targets arm_arch_v*_multilib are not strict enough
  2012-12-21 18:58 [Bug testsuite/55780] New: effective targets arm_arch_v*_multilib are not strict enough janis at gcc dot gnu.org
@ 2013-01-02 12:17 ` gretay at gcc dot gnu.org
  2013-01-03 22:52 ` janis at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: gretay at gcc dot gnu.org @ 2013-01-02 12:17 UTC (permalink / raw)
  To: gcc-bugs


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

gretay at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gretay at gcc dot gnu.org

--- Comment #1 from gretay at gcc dot gnu.org 2013-01-02 12:17:07 UTC ---
The intention of arm_arch_v*_multilib is to check which multilibs available in
the toolchain rather than hardware capabilities. These effective target checks
fail at link time, but there is no check_link procedure in gcc/testsuite/lib so
check_runtime is used instead.

For example, using compiler with armv7a (cortex-a15) libraries only,
arm_arch_v6m_multilib effective target check fails and the test is UNSUPPORTED
in my setting on qemu:

$ cat arm_arch_v6m_multilib8582.c 
int
main (void)
{
  return 0;
}

$ /work/dec-builds/base/install/bin/arm-none-eabi-gcc
arm_arch_v6m_multilib8582.c -fno-diagnostics-show-caret   -march=armv6-m
-mthumb -DSTACK_SIZE=16384 -lm   -o arm_arch_v6m_multilib8582.exe
/work/dec-builds/base/install/lib/gcc/arm-none-eabi/4.8.0/../../../../arm-none-eabi/bin/ld:
error: /tmp/ccwSCtn0.o: Conflicting architecture profiles M/A
/work/dec-builds/base/install/lib/gcc/arm-none-eabi/4.8.0/../../../../arm-none-eabi/bin/ld:
failed to merge target specific data of file /tmp/ccwSCtn0.o
collect2: error: ld returned 1 exit status

UNSUPPORTED: gcc.target/arm/ftest-armv6m-thumb.c

Configured with: --target=arm-none-eabi --with-newlib --with-gnu-as
--with-gnu-ld --enable-languages=c,c++ --disable-shared --disable-nls
--disable-threads --disable-lto --disable-tls --enable-checking=yes
--disable-libssp --disable-libgomp --disable-libmudflap --with-cpu=cortex-a15
--with-fpu=neon-vfpv4 --with-float=softfp 
Thread model: single
gcc version 4.8.0 20121213 (experimental) (GCC)


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

* [Bug testsuite/55780] effective targets arm_arch_v*_multilib are not strict enough
  2012-12-21 18:58 [Bug testsuite/55780] New: effective targets arm_arch_v*_multilib are not strict enough janis at gcc dot gnu.org
  2013-01-02 12:17 ` [Bug testsuite/55780] " gretay at gcc dot gnu.org
@ 2013-01-03 22:52 ` janis at gcc dot gnu.org
  2013-01-15 15:52 ` aldyh at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: janis at gcc dot gnu.org @ 2013-01-03 22:52 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Janis Johnson <janis at gcc dot gnu.org> 2013-01-03 22:52:03 UTC ---
Here's the configuration for the FSF mainline compiler I'm using:

Target: arm-none-eabi
Configured with:
/scratch/janisjo/build6/fsf-arm-eabi/src/gcc-mainline/configure
--build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-eabi
--enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch
--with-gnu-as --with-gnu-ld --enable-languages=c,c++ --disable-shared
--enable-lto --with-newlib --disable-nls --prefix=/opt/codesourcery
--with-headers=yes --with-sysroot=/opt/codesourcery/arm-none-eabi
--with-build-sysroot=/scratch/janisjo/build6/fsf-arm-eabi/install/arm-none-eabi
--disable-libgomp --disable-libitm 
Thread model: single
gcc version 4.8.0 20130103 (experimental) (GCC)

For this compiler, none of the links fail for the arm_arch_v*_multilib checks.
Some of those checks fail at runtime, causing ftest-*.c tests to be
UNSUPPORTED.  In more cases, the simulator passes when running the
arm_arch_v*_multilib check and then fails when running the test, causing it to
FAIL instead of being UNSUPPORTED.

It should be easy enough to add a check_link procedure, similar to
check_compile or check_runtime, but from I've seen that would pass with all of
these checks for my configuration.  I suspect that a more robust link check
would need target-specific code requiring calls to target-specific runtime
libraries.

A separate issue is that these checks are being used to determine whether or
not to skip "dg-do run" tests, and that those tests can be rewritten to check
the tested functionality at compile-time instead of run time; see
<http://gcc.gnu.org/ml/gcc-patches/2012-12/msg01339.html>.


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

* [Bug testsuite/55780] effective targets arm_arch_v*_multilib are not strict enough
  2012-12-21 18:58 [Bug testsuite/55780] New: effective targets arm_arch_v*_multilib are not strict enough janis at gcc dot gnu.org
  2013-01-02 12:17 ` [Bug testsuite/55780] " gretay at gcc dot gnu.org
  2013-01-03 22:52 ` janis at gcc dot gnu.org
@ 2013-01-15 15:52 ` aldyh at gcc dot gnu.org
  2013-02-19 23:41 ` ramana at gcc dot gnu.org
  2013-02-19 23:53 ` janis at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: aldyh at gcc dot gnu.org @ 2013-01-15 15:52 UTC (permalink / raw)
  To: gcc-bugs


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

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aldyh at gcc dot gnu.org

--- Comment #3 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2013-01-15 15:52:01 UTC ---
Proposed fix by Janis here:

http://gcc.gnu.org/ml/gcc-patches/2012-12/msg01339.html


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

* [Bug testsuite/55780] effective targets arm_arch_v*_multilib are not strict enough
  2012-12-21 18:58 [Bug testsuite/55780] New: effective targets arm_arch_v*_multilib are not strict enough janis at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-01-15 15:52 ` aldyh at gcc dot gnu.org
@ 2013-02-19 23:41 ` ramana at gcc dot gnu.org
  2013-02-19 23:53 ` janis at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ramana at gcc dot gnu.org @ 2013-02-19 23:41 UTC (permalink / raw)
  To: gcc-bugs


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

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ramana at gcc dot gnu.org

--- Comment #4 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2013-02-19 23:41:01 UTC ---
Janis, 

Is this now "fixed" by changing all the tests to compile time only tests ? 

Ramana


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

* [Bug testsuite/55780] effective targets arm_arch_v*_multilib are not strict enough
  2012-12-21 18:58 [Bug testsuite/55780] New: effective targets arm_arch_v*_multilib are not strict enough janis at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2013-02-19 23:41 ` ramana at gcc dot gnu.org
@ 2013-02-19 23:53 ` janis at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: janis at gcc dot gnu.org @ 2013-02-19 23:53 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Janis Johnson <janis at gcc dot gnu.org> 2013-02-19 23:53:05 UTC ---
The gcc.target/arm/ftest-*.c tests now work without hangs, but the effective
target checks are still in the testsuite available to be used by other tests
where they will show the same problems.  These effective target checks could be
useful, but not in their current state.


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

end of thread, other threads:[~2013-02-19 23:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-21 18:58 [Bug testsuite/55780] New: effective targets arm_arch_v*_multilib are not strict enough janis at gcc dot gnu.org
2013-01-02 12:17 ` [Bug testsuite/55780] " gretay at gcc dot gnu.org
2013-01-03 22:52 ` janis at gcc dot gnu.org
2013-01-15 15:52 ` aldyh at gcc dot gnu.org
2013-02-19 23:41 ` ramana at gcc dot gnu.org
2013-02-19 23:53 ` janis at gcc dot gnu.org

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).