diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 212a9e2fd13cb188f2b6287015408aa2642ea001..156030e720ece4fea5ee1bcb81472d0f5d616b9c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2009-10-17  Alexandre Oliva  <aoliva@redhat.com>
+
+	* print-rtl.c (print_rtx): Print locators in asm_operands
+	and asm_input.
+
 2009-10-17  Alexandre Oliva  <aoliva@redhat.com>
 
 	PR debug/41535
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
index 29d3ab91832f9addd6363651f1ee001bbebc8c8b..cb3f7dae31f02770018c7628c331539b1e6e7bc8 100644
--- a/gcc/print-rtl.c
+++ b/gcc/print-rtl.c
@@ -383,6 +383,22 @@ print_rtx (const_rtx in_rtx)
 		when there is no location information available.  */
 	    if (INSN_LOCATOR (in_rtx) && insn_file (in_rtx))
 	      fprintf(outfile, " %s:%i", insn_file (in_rtx), insn_line (in_rtx));
+#endif
+	  }
+	else if (i == 6 && GET_CODE (in_rtx) == ASM_OPERANDS)
+	  {
+#ifndef GENERATOR_FILE
+	    fprintf (outfile, " %s:%i",
+		     locator_file (ASM_OPERANDS_SOURCE_LOCATION (in_rtx)),
+		     locator_line (ASM_OPERANDS_SOURCE_LOCATION (in_rtx)));
+#endif
+	  }
+	else if (i == 1 && GET_CODE (in_rtx) == ASM_INPUT)
+	  {
+#ifndef GENERATOR_FILE
+	    fprintf (outfile, " %s:%i",
+		     locator_file (ASM_INPUT_SOURCE_LOCATION (in_rtx)),
+		     locator_line (ASM_INPUT_SOURCE_LOCATION (in_rtx)));
 #endif
 	  }
 	else if (i == 6 && NOTE_P (in_rtx))