public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/12204] New: [regression] gcc emits bogus .file when __inline__ called
@ 2003-09-08  0:35 mec at shout dot net
  2003-09-08  0:36 ` [Bug debug/12204] " mec at shout dot net
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: mec at shout dot net @ 2003-09-08  0:35 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12204

           Summary: [regression] gcc emits bogus .file when __inline__
                    called
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P1
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mec at shout dot net
                CC: gcc-bugs at gcc dot gnu dot org,jh at suse dot cz
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

gcc emits a bogus ".file" directive when an __inline__ function is called.

I will attach a full test program, before-and-after output, and so on.  Here is
a snippet of the test program:

  # 1 "z2.c"
  # 1 "/usr/include/sys/stat.h" 1 3
  # 337 "/usr/include/sys/stat.h" 3

  extern __inline__ int fstat ()
  {
    return 0;
  }

  #2 "z2.c" 2

  ...

  int
  test_fstat ()
  {
    marker1 ();
    fstat ();
    marker2 ();
    return 0;
  }

Here is the output from "gcc -gdwarf-2 -S":

  .globl main
          .type main, @function
  main:
  .LFB6:
          .file 2 "/usr/include/sys/stat.h"
          .loc 2 23 0
          pushl %ebp
  .LCFI7:
          movl %esp, %ebp

That ".file" directive is bogus!

This happens with gcc HEAD 2003-09-03 15:00:00 UTC.
It does not happen with gcc HEAD 2003-09-03 14:00:00 UTC.
The patch responsible is:

http://gcc.gnu.org/ml/gcc-patches/2003-09/msg00000.html

Wed Sep  3 16:55:25 CEST 2003  Jan Hubicka  <jh@suse.cz>
+                                                                              
+       * Makefile.in (c-objc-common.o): Kill gt-c-objc-common.h dependency.
+       * c-decl.c (finish_function):  Kill arguments, always use cgraph path. 
+       * c-objc-common.c: Kill include of gt-c-objc-common.h
+       (expand_deferred_fns, deffer_fn): Kill function.                       
+       (deferred_fns): Kill variable.
+       (finish_cdtor): Update finish_function call.                           
+       (c_objc_common_finish_file): Always call cgraph code.
+       * c-parse.c: Regenerate.                                               
+       * c-parse.y: Regenerate.
+       * c-tree.h (finish_function): Update prototype.                        
+       * objc-acct.c (build_module_descriptor, finish_method_def):
+       Update call of finish_function.                                        
+       * cgraphunit.c (cgraph_default_inline_p, cgraph_analyze_function): Add
+       forward prototype.                                                     
+       (cgraph_finalize_function): In non-unit-at-a-time mode analyze the
+       function and assemble it if needed.                                    
+       (cgraph_finalize_compilation_unit): Do nothing in non-unit-at-a-time
+       mode.                                                                  
+       (cgraph_optimize): Likewise.
+       (cgraph_expand_function): In non-unit-at-a-time mode keep function body
+       even when it has no inline callees.
+       * c-parse.in: Update calls to finish_function.                          +

This is a regression against gcc 3.3.1, so I am marking it "P1", although it is
just normal severity.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-09-11 21:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-08  0:35 [Bug debug/12204] New: [regression] gcc emits bogus .file when __inline__ called mec at shout dot net
2003-09-08  0:36 ` [Bug debug/12204] " mec at shout dot net
2003-09-08  0:37 ` mec at shout dot net
2003-09-08  0:39 ` mec at shout dot net
2003-09-10 19:07 ` pinskia at gcc dot gnu dot org
2003-09-11 15:58 ` [Bug debug/12204] [3.4 regression] " pinskia at gcc dot gnu dot org
2003-09-11 21:03 ` mec at shout dot net
2003-09-11 21:06 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).