function.c (init_function_start): Don't call emit_line_note if lineno is 0.
authorPer Bothner <bothner@gcc.gnu.org>
Thu, 21 May 1998 12:23:59 +0000 (05:23 -0700)
committerPer Bothner <bothner@gcc.gnu.org>
Thu, 21 May 1998 12:23:59 +0000 (05:23 -0700)
8
* function.c (init_function_start):  Don't call emit_line_note if
lineno is 0.  (Can happen when compiling Java .class files.)

From-SVN: r19930

gcc/function.c

index 2d1056f4371a46cf29d5dc26e8646463e46cd2e9..900ad3b47cbf8006757fa66cfa571856fde7f6c9 100644 (file)
@@ -5351,8 +5351,10 @@ init_function_start (subr, filename, line)
   current_function_outgoing_args_size = 0;
 
   /* Prevent ever trying to delete the first instruction of a function.
-     Also tell final how to output a linenum before the function prologue.  */
-  emit_line_note (filename, line);
+     Also tell final how to output a linenum before the function prologue.
+     Note linenums could be missing, e.g. when compiling a Java .class file. */
+  if (line > 0)
+    emit_line_note (filename, line);
 
   /* Make sure first insn is a note even if we don't want linenums.
      This makes sure the first insn will never be deleted.