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 tree-optimization/22158] New: char global_var[] = "larger than 32 bytes"; uses silly amounts of alignment even with -Os


static char *s0 = "000000000000000000000000000000000000000000000000";
static char s1[] = "111111111111111111111111111111111111111111111111";
static char *s2 = "000000000000000000000000000000000000000000000000";
static char s3[] = "111111111111111111111111111111111111111111111111";

void f(char*);
void g() {
    f(s0);
    f(s1);
    f(s2);
    f(s3);
}

s1 and s2 are aligned on 32 bytes even with -Os, while s2 and s4 are not.
See http://gcc.gnu.org/ml/gcc/2002-01/msg01068.html,
http://gcc.gnu.org/ml/gcc/2002-01/msg01068/i386.c.PATCH

-- 
           Summary: char global_var[] = "larger than 32 bytes"; uses silly
                    amounts of alignment even with -Os
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: vda at port dot imtp dot ilyichevsk dot odessa dot ua
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-pc-linux-gnu
  GCC host triplet: i386-pc-linux-gnu
GCC target triplet: i386-pc-linux-gnu


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


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