dump-tree-original-raw does not print the linkage for 
a variable with file scope. 
--- test case (sta.c)---
static int static_var=9;
double global_var = 0;
main() {
        int x;
        x = 4+ static_var + global_var;
        return x;
}
-- to reproduce ---
gcc -fdump-tree-original-raw sta.c
tail -7 sta.c.t02.original
-- bug ---
There is no linkage infomation "static" can be found for var_del static_var.

@39     var_decl         name: @41      type: @7       srcp: sta.c:1      
                         init: @42      size: @9       algn: 32      
                         used: 1       
@40     integer_cst      type: @7       low : 4       
@41     identifier_node  strg: static_var              lngt: 10      
@42     integer_cst      type: @7       low : 9       

--- config ---
$ gcc -v
Using built-in specs.
Target: i686-pc-cygwin
Configured with: ./configure --enable-languages=c,c++
Thread model: single
gcc version 4.1.0


-- 
           Summary: dump-tree-original-raw does not print the linkage for a
                    variable with file scope.
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: yokoyama-hxb at necst dot nec dot co dot jp


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

Reply via email to