public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/42348]  New: Syntax of dg-skip-if in two obj-c++ tests
@ 2009-12-10 12:17 dominiq at lps dot ens dot fr
  2009-12-10 18:13 ` [Bug testsuite/42348] " mrs at apple dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-12-10 12:17 UTC (permalink / raw)
  To: gcc-bugs

While chasing pr42333, I stumbled that using
"RUNTESTFLAGS=--target_board=unix'{-m32,}'" or
"RUNTESTFLAGS=--target_board=unix'{-m32,-m64}'" gave different results for two
obj-c++ tests (const-str-9.mm and template-4.mm) on x86_64-apple-darwin10. The
reason is that their dg-skip-if expect explicitly the -m64 option, not needed
for 64 bit platforms. Does the following patch makes sense?

diff -up ../_clean/gcc/testsuite/obj-c++.dg/const-str-9.mm
../work/gcc/testsuite/obj-c++.dg/const-str-9.mm
--- ../_clean/gcc/testsuite/obj-c++.dg/const-str-9.mm   2009-11-25
18:16:34.000000000 +0100
+++ ../work/gcc/testsuite/obj-c++.dg/const-str-9.mm     2009-12-10
11:13:03.000000000 +0100
@@ -3,7 +3,7 @@

 /* { dg-options "-fnext-runtime" } */
 /* { dg-do compile { target *-*-darwin* } } */
-/* { dg-skip-if "" { *-*-darwin* } { "-m64" } { "" } } */
+/* { dg-skip-if "" { *-*-darwin* && lp64 } { "*" } { "" } } */

 #include <objc/Object.h>

diff -up ../_clean/gcc/testsuite/obj-c++.dg/template-4.mm
../work/gcc/testsuite/obj-c++.dg/template-4.mm
--- ../_clean/gcc/testsuite/obj-c++.dg/template-4.mm    2009-11-25
18:16:34.000000000 +0100
+++ ../work/gcc/testsuite/obj-c++.dg/template-4.mm      2009-12-10
11:14:02.000000000 +0100
@@ -1,7 +1,7 @@
 /* Author:  Ziemowit Laski <zlaski@apple.com>.  */

 /* { dg-do run } */
-/* { dg-skip-if "" { *-*-darwin* } { "-m64" } { "" } } */
+/* { dg-skip-if "" { *-*-darwin* && lp64 } { "*" } { "" } } */

 #include <objc/Object.h>
 #include <stdarg.h>


-- 
           Summary: Syntax of dg-skip-if in two obj-c++ tests
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dominiq at lps dot ens dot fr
 GCC build triplet: *-apple-darwin*
  GCC host triplet: *-apple-darwin*
GCC target triplet: *-apple-darwin*


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


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

* [Bug testsuite/42348] Syntax of dg-skip-if in two obj-c++ tests
  2009-12-10 12:17 [Bug testsuite/42348] New: Syntax of dg-skip-if in two obj-c++ tests dominiq at lps dot ens dot fr
@ 2009-12-10 18:13 ` mrs at apple dot com
  2009-12-11 13:35 ` developer at sandoe-acoustics dot co dot uk
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mrs at apple dot com @ 2009-12-10 18:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from mrs at apple dot com  2009-12-10 18:13 -------
In general you can answer what we think is best by checking the llvm-gcc
sources from llvm, and in this case, we are using:

/* { dg-options "-fnext-runtime -fno-constant-cfstrings" } */
/* { dg-do compile { target powerpc*-*-darwin* i?86*-*-darwin* } } */
/* { dg-require-effective-target ilp32 } */

for const-str-9.mm.  For template-4.mm:

/* { dg-do run { target powerpc*-*-darwin* } } */
/* { dg-require-effective-target ilp32 } */


-- 


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


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

* [Bug testsuite/42348] Syntax of dg-skip-if in two obj-c++ tests
  2009-12-10 12:17 [Bug testsuite/42348] New: Syntax of dg-skip-if in two obj-c++ tests dominiq at lps dot ens dot fr
  2009-12-10 18:13 ` [Bug testsuite/42348] " mrs at apple dot com
@ 2009-12-11 13:35 ` developer at sandoe-acoustics dot co dot uk
  2009-12-11 14:08 ` developer at sandoe-acoustics dot co dot uk
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: developer at sandoe-acoustics dot co dot uk @ 2009-12-11 13:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from developer at sandoe-acoustics dot co dot uk  2009-12-11 13:35 -------
(In reply to comment #1)
> In general you can answer what we think is best by checking the llvm-gcc
> sources from llvm, and in this case, we are using:
> 
> /* { dg-options "-fnext-runtime -fno-constant-cfstrings" } */

delete -fno-constant-cfstrings

>   For template-4.mm:
> 
> /* { dg-do run { target powerpc*-*-darwin* } } */

why is this being restricted to darwin (and powerpc at that)?  The testcase
appears to cater for gnu runtime too...

> /* { dg-require-effective-target ilp32 } */

Having said this -- we have a global problem with using ?lp32/64 in ObjC/ObjC++
testcases along with -fgnu-runtime.  This flag causes xgcc/g++ to print a
warning - which means that these target supports tests always fail for
-fgnu-runtime.


-- 


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


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

* [Bug testsuite/42348] Syntax of dg-skip-if in two obj-c++ tests
  2009-12-10 12:17 [Bug testsuite/42348] New: Syntax of dg-skip-if in two obj-c++ tests dominiq at lps dot ens dot fr
  2009-12-10 18:13 ` [Bug testsuite/42348] " mrs at apple dot com
  2009-12-11 13:35 ` developer at sandoe-acoustics dot co dot uk
@ 2009-12-11 14:08 ` developer at sandoe-acoustics dot co dot uk
  2009-12-14 16:47 ` developer at sandoe-acoustics dot co dot uk
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: developer at sandoe-acoustics dot co dot uk @ 2009-12-11 14:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from developer at sandoe-acoustics dot co dot uk  2009-12-11 14:08 -------
(In reply to comment #2)
> (In reply to comment #1)
> >   For template-4.mm:
> > 
> > /* { dg-do run { target powerpc*-*-darwin* } } */
> 
> why is this being restricted to darwin (and powerpc at that)?  The testcase
> appears to cater for gnu runtime too...

well.. it does work for -fgnu-runtime, on i686 darwin9 at least...  so "{
target powerpc*-*-darwin* }" should probably be deleted.

However, it ONLY works if the compiler is installed -- objc/NXConstStr.h is not
found otherwise (this is a separate problem, of course).


-- 


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


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

* [Bug testsuite/42348] Syntax of dg-skip-if in two obj-c++ tests
  2009-12-10 12:17 [Bug testsuite/42348] New: Syntax of dg-skip-if in two obj-c++ tests dominiq at lps dot ens dot fr
                   ` (2 preceding siblings ...)
  2009-12-11 14:08 ` developer at sandoe-acoustics dot co dot uk
@ 2009-12-14 16:47 ` developer at sandoe-acoustics dot co dot uk
  2009-12-14 16:50 ` developer at sandoe-acoustics dot co dot uk
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: developer at sandoe-acoustics dot co dot uk @ 2009-12-14 16:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from developer at sandoe-acoustics dot co dot uk  2009-12-14 16:47 -------
there are several problems:

1/ the target-supports tests fail if called with ObjC/ObjC++ specific flags
(e.g. -fgnu-runtime).

2/ there is no specific target-supports test for OBJC2 (which is needed for
64bit Next Runtime support)

3/ The tests for the gnu-runtime library usage are failing in
testsuite/lib/objc.exp and obj-c++.exp. [they only detect if -fgnu-runtime is
placed in the dg-options, rather than also checking the multilib options].

to allow you guys to test and comment, I'll attach patches for all three
problems here - although maybe they should be three separate PRs.


-- 


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


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

* [Bug testsuite/42348] Syntax of dg-skip-if in two obj-c++ tests
  2009-12-10 12:17 [Bug testsuite/42348] New: Syntax of dg-skip-if in two obj-c++ tests dominiq at lps dot ens dot fr
                   ` (3 preceding siblings ...)
  2009-12-14 16:47 ` developer at sandoe-acoustics dot co dot uk
@ 2009-12-14 16:50 ` developer at sandoe-acoustics dot co dot uk
  2009-12-14 16:54 ` developer at sandoe-acoustics dot co dot uk
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: developer at sandoe-acoustics dot co dot uk @ 2009-12-14 16:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from developer at sandoe-acoustics dot co dot uk  2009-12-14 16:50 -------
Created an attachment (id=19290)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19290&action=view)
add support for ObjC/ObjC++ and an effective target OBJ2 test

when -fnext-runtime, -fgnu-runtime, nostdinc++ are used the testfile suffix
needs to be .m/.mm as appropriate.


-- 


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


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

* [Bug testsuite/42348] Syntax of dg-skip-if in two obj-c++ tests
  2009-12-10 12:17 [Bug testsuite/42348] New: Syntax of dg-skip-if in two obj-c++ tests dominiq at lps dot ens dot fr
                   ` (4 preceding siblings ...)
  2009-12-14 16:50 ` developer at sandoe-acoustics dot co dot uk
@ 2009-12-14 16:54 ` developer at sandoe-acoustics dot co dot uk
  2009-12-14 16:56 ` developer at sandoe-acoustics dot co dot uk
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: developer at sandoe-acoustics dot co dot uk @ 2009-12-14 16:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from developer at sandoe-acoustics dot co dot uk  2009-12-14 16:54 -------
Created an attachment (id=19291)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19291&action=view)
changes to recognize correctly which ObjC runtime is in use

this (a) tracks the -fgnu-runtime/-fnext-runtime flags to detect which is in
force.
The libobjc-gnu is added and also made available as a %s substitution.
The gnu-includes are added when the gnu runtime is in use.


-- 


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


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

* [Bug testsuite/42348] Syntax of dg-skip-if in two obj-c++ tests
  2009-12-10 12:17 [Bug testsuite/42348] New: Syntax of dg-skip-if in two obj-c++ tests dominiq at lps dot ens dot fr
                   ` (5 preceding siblings ...)
  2009-12-14 16:54 ` developer at sandoe-acoustics dot co dot uk
@ 2009-12-14 16:56 ` developer at sandoe-acoustics dot co dot uk
  2009-12-14 16:59 ` developer at sandoe-acoustics dot co dot uk
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: developer at sandoe-acoustics dot co dot uk @ 2009-12-14 16:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from developer at sandoe-acoustics dot co dot uk  2009-12-14 16:56 -------
Created an attachment (id=19292)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19292&action=view)
changes to recognize correctly which ObjC runtime is in use

this (a) tracks the -fgnu-runtime/-fnext-runtime flags to detect which is in
force.
The libobjc-gnu is added and also made available as a %s spec substitution.
The gnu-includes are added when the gnu runtime is in use.
%s spec  substitution is also catered for for the stdc++-v3 library


-- 


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


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

* [Bug testsuite/42348] Syntax of dg-skip-if in two obj-c++ tests
  2009-12-10 12:17 [Bug testsuite/42348] New: Syntax of dg-skip-if in two obj-c++ tests dominiq at lps dot ens dot fr
                   ` (6 preceding siblings ...)
  2009-12-14 16:56 ` developer at sandoe-acoustics dot co dot uk
@ 2009-12-14 16:59 ` developer at sandoe-acoustics dot co dot uk
  2010-02-19 23:36 ` developer at sandoe-acoustics dot co dot uk
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: developer at sandoe-acoustics dot co dot uk @ 2009-12-14 16:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from developer at sandoe-acoustics dot co dot uk  2009-12-14 16:59 -------
with the patches above;

testsuite/obj-c++.dg/const-str-9.mm should have:
/* { dg-do compile { target *-*-darwin* } } */
/* { dg-skip-if "" { *-*-darwin* } { "-fgnu-runtime" } { "" } } */
/* { dg-skip-if "" { *-*-darwin* && { lp64 && { ! objc2 } } } { "*" } { "" } }
*/

testsuite/obj-c++.dg/template-4.mm
/* { dg-do run } */
/* { dg-skip-if "" { *-*-darwin* && { lp64 && { ! objc2 } } } { "*" } {
"-fgnu-runtime" } } */

In fact, arguably all the ObjC/ObjC++ tests should have something along these
lines - it should reduce clutter until OBJC2 support is available in FSF gcc.


-- 


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


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

* [Bug testsuite/42348] Syntax of dg-skip-if in two obj-c++ tests
  2009-12-10 12:17 [Bug testsuite/42348] New: Syntax of dg-skip-if in two obj-c++ tests dominiq at lps dot ens dot fr
                   ` (7 preceding siblings ...)
  2009-12-14 16:59 ` developer at sandoe-acoustics dot co dot uk
@ 2010-02-19 23:36 ` developer at sandoe-acoustics dot co dot uk
  2010-03-24 22:51 ` janis at gcc dot gnu dot org
  2010-03-26 12:45 ` dominiq at lps dot ens dot fr
  10 siblings, 0 replies; 12+ messages in thread
From: developer at sandoe-acoustics dot co dot uk @ 2010-02-19 23:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from developer at sandoe-acoustics dot co dot uk  2010-02-19 23:36 -------
Created an attachment (id=19927)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19927&action=view)
updated patch against 156812

gcc/testsuite/Changelog:

2009-12-17 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>

PR testsuite/42348

* lib/target-supports.exp: Add support for ObjC/ObjC++ tools in
standard tests, (check_effective_target_objc2) New proc.
(check_effective_target_next_runtime) New proc.
* lib/objc.exp: Walk through the gnu/next runtime flags to determine which
is actually in force, attach the appropriate includes accordingly.
* lib/obj-c++.exp: Ditto.


-- 

developer at sandoe-acoustics dot co dot uk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #19290|0                           |1
        is obsolete|                            |
  Attachment #19291|0                           |1
        is obsolete|                            |
  Attachment #19292|0                           |1
        is obsolete|                            |


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


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

* [Bug testsuite/42348] Syntax of dg-skip-if in two obj-c++ tests
  2009-12-10 12:17 [Bug testsuite/42348] New: Syntax of dg-skip-if in two obj-c++ tests dominiq at lps dot ens dot fr
                   ` (8 preceding siblings ...)
  2010-02-19 23:36 ` developer at sandoe-acoustics dot co dot uk
@ 2010-03-24 22:51 ` janis at gcc dot gnu dot org
  2010-03-26 12:45 ` dominiq at lps dot ens dot fr
  10 siblings, 0 replies; 12+ messages in thread
From: janis at gcc dot gnu dot org @ 2010-03-24 22:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from janis at gcc dot gnu dot org  2010-03-24 22:51 -------
Subject: Bug 42348

Author: janis
Date: Wed Mar 24 22:51:08 2010
New Revision: 157715

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157715
Log:
2010-03-24  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>

        PR testsuite/42348
        * lib/target-supports.exp: Add support for ObjC/ObjC++ tools in
        standard tests.
        (check_effective_target_objc2): New proc.
        (check_effective_target_next_runtime): New proc.
        * lib/objc.exp: Determine which runtime is in force and support it.
        * lib/obj-c++.exp: Ditto.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/lib/obj-c++.exp
    trunk/gcc/testsuite/lib/objc.exp
    trunk/gcc/testsuite/lib/target-supports.exp


-- 


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


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

* [Bug testsuite/42348] Syntax of dg-skip-if in two obj-c++ tests
  2009-12-10 12:17 [Bug testsuite/42348] New: Syntax of dg-skip-if in two obj-c++ tests dominiq at lps dot ens dot fr
                   ` (9 preceding siblings ...)
  2010-03-24 22:51 ` janis at gcc dot gnu dot org
@ 2010-03-26 12:45 ` dominiq at lps dot ens dot fr
  10 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens dot fr @ 2010-03-26 12:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from dominiq at lps dot ens dot fr  2010-03-26 12:45 -------
Closing as fixed. Thanks for the work.


-- 

dominiq at lps dot ens dot fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2010-03-26 12:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-10 12:17 [Bug testsuite/42348] New: Syntax of dg-skip-if in two obj-c++ tests dominiq at lps dot ens dot fr
2009-12-10 18:13 ` [Bug testsuite/42348] " mrs at apple dot com
2009-12-11 13:35 ` developer at sandoe-acoustics dot co dot uk
2009-12-11 14:08 ` developer at sandoe-acoustics dot co dot uk
2009-12-14 16:47 ` developer at sandoe-acoustics dot co dot uk
2009-12-14 16:50 ` developer at sandoe-acoustics dot co dot uk
2009-12-14 16:54 ` developer at sandoe-acoustics dot co dot uk
2009-12-14 16:56 ` developer at sandoe-acoustics dot co dot uk
2009-12-14 16:59 ` developer at sandoe-acoustics dot co dot uk
2010-02-19 23:36 ` developer at sandoe-acoustics dot co dot uk
2010-03-24 22:51 ` janis at gcc dot gnu dot org
2010-03-26 12:45 ` dominiq at lps dot ens dot fr

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