2009-10-20-GlobalDebug.c failing on Windows

Devang,

On Windows, the 2009-10-20-GlobalDebug.c test fails. Is it because debug info is not yet supported on Windows? If so, how could this test be set up to not fail?

-John

Devang,

On Windows, the 2009-10-20-GlobalDebug.c test fails. Is it because debug info is not yet supported on Windows?

Is that the real reason ? I do not know.

If so, how could this test be set up to not fail?

Is it possible to xfail or xtarget this test ?

You could just force the triple...

  - Doug

Hmmm, I tried passing -Xclang “-triple=i686-pc-linux-gnu” to clang.exe, but apparently it conflicts with a -target directive the driver puts in. But I’m not sure this is the proper format. The driver didn’t like just “-target=i686-pc-linux-gnu” either.

Is this a bug in the driver, not checking for options being overidden?

What does the -dA option do? I don’t see it in “clang -help”.

Which triple should it be using?

Here’s the command output, with the triple option and a -v also:

FAIL: Clang::CodeGen/2009-10-20-GlobalDebug.c (1 of 1)
******************** TEST ‘Clang::CodeGen/2009-10-20-GlobalDebug.c’ FAILED ********************
Script:

Hmmm, I tried passing -Xclang "-triple=i686-pc-linux-gnu" to clang.exe, but
apparently it conflicts with a -target directive the driver puts in. But
I'm not sure this is the proper format. The driver didn't like just
"-target=i686-pc-linux-gnu" either.

There is "-ccc-host-triple" to override the triple passed to clang-cc.

Is this a bug in the driver, not checking for options being overidden?
What does the -dA option do? I don't see it in "clang -help".

verbose assembly

Which triple should it be using?

The test was failing on all non-darwin platforms so I forced the triple to i386-apple-darwin10 in r84777.

Forcing the triple is fairly brute force. Does it work if you change the check line to:

// CHECK: asciz "global" {{.*}}DW_AT_MIPS_linkage_name

?

-Chris

I chose to force the triple because I wasn't sure if all targets use "asciz" for string literals.

I chose to force the triple because I wasn’t sure if all targets use “asciz” for string literals.

There’s no asciz. Here’s the output:

.section .debug_frame,“dr”
$section_debug_frame:
.section .debug_info,“dr”
$section_info:
.section .debug_abbrev,“dr”
$section_abbrev:
.section .debug_aranges,“dr”
$section_aranges:
.section .debug_macinfo,“dr”
$section_macinfo:
.section .debug_line,“dr”
$section_line:
.section .debug_loc,“dr”
$section_loc:
.section .debug_pubnames,“dr”
$section_pubnames:
.section .debug_str,“dr”
$section_str:
.section .debug_ranges,“dr”
$section_ranges:
.text
$text_begin:
.data
$data_begin:

.text
ALIGN 16
.globl _main
_main: ; @main
; BB#0: ; %entry
pushl %ebp
$label1:
movl %esp, %ebp
$label2:
subl $4, %esp
$label3:
movl $0, -4(%ebp)
movl $0, -4(%ebp) ; SrcLine 4:14
movl -4(%ebp), %eax ; SrcLine 4:14
addl $4, %esp ; SrcLine 4:14
popl %ebp ; SrcLine 4:14
ret ; SrcLine 4:14
.section .data$linkonce_global,“w”
.comm _global,4,4 ; @global

I chose to force the triple because I wasn’t sure if all targets use “asciz” for string literals.

There’s no asciz. Here’s the output:

Ok, no debug info at all, lets go with a forced triple.

-Chris