This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/55026] Useless stores generated for structures passed by value


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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-10-22
                 CC|                            |ebotcazou at gcc dot
                   |                            |gnu.org
            Summary|[Multiple targets]          |Useless stores generated
                   |Inefficient code with       |for structures passed by
                   |structs passed by value     |value
     Ever Confirmed|0                           |1
           Severity|normal                      |enhancement

--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-10-22 19:08:10 UTC ---
This depends on the internal argument passing mechanism (BLKmode registers vs
PARALLEL) and on the strict-alignment requirements of the architecture.  Try:

struct __attribute__((aligned (8))) foo {
    int a;
    int b;
};

int f(struct foo x)
{
  return x.a + x.b;
}

to watch the effects of the latter.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]