public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/65734] New: Yet another case of lost alignment by stor_layout
@ 2015-04-10 18:49 hubicka at gcc dot gnu.org
  2015-04-10 18:51 ` [Bug c++/65734] " hubicka at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-04-10 18:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65734

            Bug ID: 65734
           Summary: Yet another case of lost alignment by stor_layout
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hubicka at gcc dot gnu.org

template <typename T>
struct BVector
{
  typedef T T2;
    typedef T value_type [[gnu::aligned(8)]];    // { dg-bogus "attribute"
"attribute" }
    typedef T2 value_type2 [[gnu::aligned(8)]];  // { dg-bogus "attribute"
"attribute" }
  value_type v;
};
BVector<int> m;

template <template <class> class T>
struct BV2
{
    typedef T<float> value_type [[gnu::aligned(16)]]; // { dg-bogus "attribute"
"attribute" }
  value_type v;
};
BV2<BVector> m2;
int
main()
{
  if (__alignof__ (BV2<BVector>::value_type) != 16)
    __builtin_abort ();
}


$ /aux/hubicka/trunk-install/bin/gcc  -O2 a.C -std=gnu++11
$ ./a.out
Aborted
$ /aux/hubicka/llvm2-install/bin/clang  -O2 a.C -std=gnu++11
$ ./a.out
$ 


I think we have problem with re-layouting the type here.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-08-17 15:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-10 18:49 [Bug c++/65734] New: Yet another case of lost alignment by stor_layout hubicka at gcc dot gnu.org
2015-04-10 18:51 ` [Bug c++/65734] " hubicka at gcc dot gnu.org
2015-04-10 19:39 ` jason at gcc dot gnu.org
2015-04-11  4:16 ` jason at gcc dot gnu.org
2015-04-28 14:44 ` jason at gcc dot gnu.org
2015-04-28 15:23 ` jason at gcc dot gnu.org
2015-08-17 15:45 ` jason at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).