Compiling this code: 

extern int waiting_for_initial_map;
extern int close (int __fd);

void
first_map_occurred(void)
{
    close(cp_pipe[0]);
    close(pc_pipe[1]);
    waiting_for_initial_map = 0;
}

using -O2 -march=i686 4.[01] generate sequences like:

        movl    cp_pipe, %eax
        movl    %eax, (%esp)

for calling the close function 

the Intel compiler generates: 
 pushl     cp_pipe

-- 
           Summary: inefficient parameter passing on x86
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dann at godzilla dot ics dot uci dot edu
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i686-pc-linux-gnu


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

Reply via email to