Skip to content
Snippets Groups Projects
Commit fb9b3c0f authored by Tom de Vries's avatar Tom de Vries
Browse files

[testsuite] Add effective target large_initializer

When compiling builtin-object-size-21.c for nvptx, cc1 times out while
emitting the initializer for global variable xm3_3.

With x86_64, we are able to emit the initializer with a few lines of assembly:
...
xm3_3:
        .byte   0
        .zero   9223372036854775803
        .byte   1
        .byte   2
        .byte   3
...
but with nvptx, we don't have some something similar available, and thus
generate:
...
  .visible .global .align 1 .u32 xm3_3[2305843009213693952] =
  { 0, 0, 0, ...
...

Introduce an effective target large_initializer, returning false for nvptx,
and require it for test-cases with large initializers.

Tested on nvptx with make check-gcc.

gcc/testsuite/ChangeLog:

	PR testsuite/96566
	* lib/target-supports.exp (check_effective_target_large_initializer):
	New proc.
	* gcc.dg/builtin-object-size-21.c: Require large_initializer.
	* gcc.dg/strlenopt-55.c: Same.
parent b9c7fe59
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment