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

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #0)
> If we run the command by hand, and tail the .s file, we get an endless
> repetition of 0, 0, 0, ... , which starts off like this:
> ...
> // BEGIN GLOBAL VAR DEF: xm3_3
>         .visible .global .align 1 .u32 xm3_3[-2305843009213693951]
>           = { 0, 0, 0,
> ...
> 
> The negative length doesn't look good.

Using:
...
diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c
index cf53a921e5b..752c12561dd 100644
--- a/gcc/config/nvptx/nvptx.c
+++ b/gcc/config/nvptx/nvptx.c
@@ -2232,7 +2232,7 @@ nvptx_assemble_decl_begin (FILE *file, const char *name,
const char *section,
   if (size)
     /* We make everything an array, to simplify any initialization
        emission.  */
-    fprintf (file, "[" HOST_WIDE_INT_PRINT_DEC "]", init_frag.remaining);
+    fprintf (file, "[" HOST_WIDE_INT_PRINT_UNSIGNED "]", init_frag.remaining);
   else if (atype)
     fprintf (file, "[]");
 }
...

we have instead:
...
        .visible .global .align 1 .u32 xm3_3[16140901064495857665]
...
which in hex is 0xE000000000000001, so it still looks wrong.

Reply via email to