23208a9
2007-03-16  Andrew Haley  <aph@redhat.com>
23208a9
23208a9
	* class.c (push_class): Don't bogusly guess the source filename.
9ca88bb
	* jcf-parse.c (give_name_to_class): Don't set input_location from
9ca88bb
	DECL_ARTIFICIAL decls.
23208a9
9ca88bb
--- gcc/java/class.c        (revision 122746)
9ca88bb
+++ gcc/java/class.c        (working copy)
23208a9
@@ -426,8 +426,7 @@
23208a9
   tree decl, signature;
23208a9
   location_t saved_loc = input_location;
23208a9
 #ifndef USE_MAPPED_LOCATION
23208a9
-  tree source_name = identifier_subst (class_name, "", '.', '/', ".java");
23208a9
-  input_filename = IDENTIFIER_POINTER (source_name);
23208a9
+  input_filename = "<unknown>";
23208a9
   input_line = 0;
23208a9
 #endif
23208a9
   CLASS_P (class_type) = 1;
9ca88bb
--- gcc/java/jcf-parse.c    (revision 122746)
9ca88bb
+++ gcc/java/jcf-parse.c    (working copy)
912fdb1
@@ -1221,9 +1221,12 @@ give_name_to_class (JCF *jcf, int i)
912fdb1
 	main_input_filename = sfname;
9ca88bb
       }
9ca88bb
 #else
9ca88bb
-      input_location = DECL_SOURCE_LOCATION (TYPE_NAME (this_class));
9ca88bb
-      if (main_input_filename == NULL && jcf == main_jcf)
912fdb1
-	main_input_filename = input_filename;
9ca88bb
+      if (! DECL_ARTIFICIAL (TYPE_NAME (this_class)))
912fdb1
+	{
912fdb1
+	  input_location = DECL_SOURCE_LOCATION (TYPE_NAME (this_class));
912fdb1
+	  if (main_input_filename == NULL && jcf == main_jcf)
912fdb1
+	    main_input_filename = input_filename;
912fdb1
+	}
9ca88bb
 #endif
9ca88bb
 
9ca88bb
       jcf->cpool.data[i].t = this_class;