https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67973

            Bug ID: 67973
           Summary: All the tests for -gstabs* fail on
                    x86_64-apple-darwin14 with Xcode 7
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dominiq at lps dot ens.fr
                CC: howarth.at.gcc at gmail dot com, iains at gcc dot gnu.org,
                    mikestump at comcast dot net
  Target Milestone: ---
              Host: x86_64-apple-darwin14
            Target: x86_64-apple-darwin14
             Build: x86_64-apple-darwin14

All the tests for -gstabs* fail on x86_64-apple-darwin14 with Xcode 7: see
https://gcc.gnu.org/ml/gcc-testresults/2015-10/msg00310.html.

The new assembly needs the option -Wa,-Q in order to accept -gstabs*.

Tentative patch:

--- ../_clean/gcc/testsuite/lib/gcc-dg.exp      2015-08-21 20:09:57.000000000
+0200
+++ gcc/testsuite/lib/gcc-dg.exp        2015-09-23 14:57:59.000000000 +0200
@@ -492,11 +492,10 @@ proc gcc-dg-debug-runtest { target_compi
        set DEBUG_TORTURE_OPTIONS ""
        foreach type {-gdwarf-2 -gstabs -gstabs+ -gxcoff -gxcoff+ -gcoff} {
            set comp_output [$target_compile \
-                   "$srcdir/$subdir/$trivial" "trivial.S" assembly \
+                   "$srcdir/$subdir/$trivial" "trivial.S" assemble \
                    "additional_flags=$type"]
            if { ! [string match "*: target system does not support the * debug
format*" \
                    $comp_output] } {
-               remove-build-file "trivial.S"
                foreach level {1 "" 3} {
                    if { ($type == "-gdwarf-2") && ($level != "") } {
                        lappend DEBUG_TORTURE_OPTIONS [list "${type}"
"-g${level}"]
@@ -505,13 +504,22 @@ proc gcc-dg-debug-runtest { target_compi
                                    [list "${type}" "-g${level}" "$opt" ]
                        }
                    } else {
-                       lappend DEBUG_TORTURE_OPTIONS [list "${type}${level}"]
-                       foreach opt $opt_pend DEBUG_TORTURE_OPTIONS \
-                                   [list "${type}${level}" "$opt" ]
+                       if { [istarget *-*-darwin*] && [string match "*gstabs*"
$type] } {
+                           lappend DEBUG_TORTURE_OPTIONS [list
"${type}${level}" "-Wa,-Q" ]
+                           foreach opt $opt_opts {
+                               lappend DEBUG_TORTURE_OPTIONS \
+                                       [list "${type}${level}" "$opt" "-Wa,-Q"
]
+                           }
+                       } else {
+                           lappend DEBUG_TORTURE_OPTIONS [list
"${type}${level}" ]
+                           foreach opt $opt_opts {
+                               lappend DEBUG_TORTURE_OPTIONS \
+                                       [list "${type}${level}" "$opt" ]
+                           }
                        }
                    }
                }
+               remove-build-file "trivial.S"
            }
        }
     }


see https://gcc.gnu.org/ml/gcc-testresults/2015-10/msg00339.html.

Comments welcomed!

Reply via email to