[Bug c++/34747] __attribute__((aligned(x)))+__alignof != correct behaviour

2016-05-07 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34747

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||msebor at gcc dot gnu.org
 Blocks||58601
 Resolution|--- |DUPLICATE

--- Comment #5 from Martin Sebor  ---
When compiled with the current trunk (7.0), the test produces the output below
(same as in comment #4).  After reviewing the tests I believe all the failures
are false positives.  The failing tests assume that a #pragma pack directive
doesn't affect the alignment of struct members.  However, according to GCC
documentation for attribute packed: "Specifying this attribute [packed] for
struct and union types is equivalent to specifying the packed attribute on each
of the structure or union members."  And specifying the attribute on a member
reduces its alignment to the one specified.  So test5, for instance, expects
the alignment of a struct defined just following #pragma pack not to be
affected by the #pragma.  Similarly for all the other failing tests.  Since the
valid tests pass (fixed by PR 10179) I'll go ahead and close this report as a
duplicate of that bug.  (Based on the summary of this I'm assuming the
expectation is that #pragma pack have the same effect as attribute packed and
not something else.)

FAILED: test5
FAILED: test7
FAILED: test20
FAILED: test21
FAILED: test25
FAILED: test26
FAILED: test37
FAILED: test46
FAILED: test47
FAILED: test48
10 tests failed!

*** This bug has been marked as a duplicate of bug 10179 ***


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58601
[Bug 58601] [meta-bug] alignas

[Bug c++/34747] __attribute__((aligned(x)))+__alignof != correct behaviour

2008-05-15 Thread andry at inbox dot ru


--- Comment #4 from andry at inbox dot ru  2008-05-15 14:06 ---
Version 4.3.0 (Release), the same tests still failing.


-- 


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



[Bug c++/34747] __attribute__((aligned(x)))+__alignof != correct behaviour

2008-01-27 Thread andry at inbox dot ru


--- Comment #3 from andry at inbox dot ru  2008-01-28 01:16 ---
I build trunk (2008.01.27) and run test. Several tests still failing:
FAILED: test5
FAILED: test7
FAILED: test20
FAILED: test21
FAILED: test25
FAILED: test26
FAILED: test37
FAILED: test46
FAILED: test47
FAILED: test48
10 tests failed!


-- 


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



[Bug c++/34747] __attribute__((aligned(x)))+__alignof != correct behaviour

2008-01-12 Thread andry at inbox dot ru


--- Comment #2 from andry at inbox dot ru  2008-01-12 08:42 ---
(In reply to comment #1)
 I think this is really just PR 10179 which was fixed for 4.3.0.
 

Could you test it on 4.3?
I tried to make trunk, but stopped with error:
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME GNU C Runtime Library
| #define PACKAGE_TARNAME libgcc
| #define PACKAGE_VERSION 1.0
| #define PACKAGE_STRING GNU C Runtime Library 1.0
| #define PACKAGE_BUGREPORT 
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:2605: error: cannot compute suffix of object files: cannot compile

could you run my test on g++ 4.3 to see is that all ok?


-- 


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



[Bug c++/34747] __attribute__((aligned(x)))+__alignof != correct behaviour

2008-01-11 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2008-01-12 03:27 ---
I think this is really just PR 10179 which was fixed for 4.3.0.


-- 


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