PR target/41985
* config/i386/i386.c (get_some_local_dynamic_name): Don't assert
function contains at least one local dynamic name.
(print_operand) <case '&'>: Instead output operand lossage diagnostics
here if that happens.
* gcc.target/i386/pr41985.c: New test.
From-SVN: r154014
+2009-11-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/41985
+ * config/i386/i386.c (get_some_local_dynamic_name): Don't assert
+ function contains at least one local dynamic name.
+ (print_operand) <case '&'>: Instead output operand lossage diagnostics
+ here if that happens.
+
2009-11-08 Zbigniew Chamski <zbigniew.chamski@gmail.com>
Joern Rennecke <amylaar@spamcop.net>
&& for_each_rtx (&PATTERN (insn), get_some_local_dynamic_name_1, 0))
return cfun->machine->some_ld_name;
- gcc_unreachable ();
+ return NULL;
}
/* Meaning of CODE:
return;
case '&':
- assemble_name (file, get_some_local_dynamic_name ());
- return;
+ {
+ const char *name = get_some_local_dynamic_name ();
+ if (name == NULL)
+ output_operand_lossage ("'%%&' used without any "
+ "local dynamic TLS references");
+ else
+ assemble_name (file, name);
+ return;
+ }
case 'A':
switch (ASSEMBLER_DIALECT)
+2009-11-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/41985
+ * gcc.target/i386/pr41985.c: New test.
+
2009-11-08 Richard Guenther <rguenther@suse.de>
* gcc.dg/torture/pta-escape-1.c: New testcase.
--- /dev/null
+/* PR target/41985 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+int
+main ()
+{
+ int i;
+ asm volatile ("# %&": : "g" (i)); /* { dg-error "used without any local dynamic TLS references" } */
+ return 0;
+}