Commit 1ad663a8 by Martin Jambor Committed by Martin Jambor

re PR middle-end/49923 (__attribute__((packed)) on ARM is sometimes dropped)

2011-08-08  Martin Jambor  <mjambor@suse.cz>

	PR middle-end/49923
	* tree-sra.c (access_precludes_ipa_sra_p): Also check access
	memory alignment.

	* testsuite/gcc.dg/tree-ssa/pr49923.c: New test.

From-SVN: r177572
parent f0efc7aa
2011-08-08 Martin Jambor <mjambor@suse.cz>
PR middle-end/49923
* tree-sra.c (access_precludes_ipa_sra_p): Also check access
memory alignment.
2011-08-08 Diego Novillo <dnovillo@google.com> 2011-08-08 Diego Novillo <dnovillo@google.com>
* Makefile.in (LTO_STREAMER_H): Add DIAGNOSTIC_H. * Makefile.in (LTO_STREAMER_H): Add DIAGNOSTIC_H.
......
2011-08-08 Martin Jambor <mjambor@suse.cz>
PR middle-end/49923
* gcc.dg/tree-ssa/pr49923.c: New test.
2011-08-08 H.J. Lu <hongjiu.lu@intel.com> 2011-08-08 H.J. Lu <hongjiu.lu@intel.com>
PR target/49781 PR target/49781
......
/* { dg-do run } */
/* { dg-options "-O3" } */
#define PACKED __attribute__(( packed ))
struct PACKED aostk_point_u8 {
unsigned char x;
unsigned char y;
};
struct PACKED aostk_size_u8 {
unsigned char width;
unsigned char height;
};
struct PACKED aostk_glyph {
unsigned short i;
struct aostk_size_u8 size;
char top;
struct aostk_point_u8 advance;
unsigned char pitch;
unsigned char* data;
char left;
};
struct PACKED aostk_font {
unsigned short numglyphs;
unsigned char height;
struct aostk_glyph* glyphs;
};
struct aostk_font glob_font;
static struct aostk_glyph* aostk_get_glyph(struct aostk_font* f, unsigned int c) {
return f->glyphs;
}
int aostk_font_strwidth(struct aostk_font* font, const char* str) {
struct aostk_glyph* g = aostk_get_glyph(font, 0);
return (g != 0);
}
struct aostk_font*
__attribute__ ((noinline, noclone))
get_some_font (void)
{
return &glob_font;
}
int main (int argc, char *argv[])
{
return (int) aostk_font_strwidth (get_some_font (), "sth");
}
...@@ -3688,6 +3688,9 @@ access_precludes_ipa_sra_p (struct access *access) ...@@ -3688,6 +3688,9 @@ access_precludes_ipa_sra_p (struct access *access)
|| gimple_code (access->stmt) == GIMPLE_ASM)) || gimple_code (access->stmt) == GIMPLE_ASM))
return true; return true;
if (tree_non_mode_aligned_mem_p (access->expr))
return true;
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment