If you compile a .class file for an inner class with gcj, e.g. gcj -o foo.so [... other options ...] Foo\$1.class then the source filename is stored as Foo$1.java (see it with e.g. eu-readelf --debug-dump=line foo.so), which is wrong. gcj should use the SourceFile attribute instead, which probably contains the correct source filename. (This problem causes rpmbuild to spew lots of errors when it tries to build the -debuginfo package for a Java package.)
No testcase provided.