Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: dabler at gmail dot com
A code that causes the problem:
void main(){ struct a { int *b; } a = { (int*){1} }; }
Command line:
gcc bug.c
The compiler output:
bug.c: In function '
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55185
--- Comment #1 from DaBler 2012-12-04 20:55:17 UTC ---
I have same problem here:
$ gcc -O3 -mno-sse -xc - < #include
> int main(){return 0;}
> END
In file included from :1:0:
/usr/include/stdlib.h: In function ‘atof’:
/usr/include/stdlib.h:280
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: dabler at gmail dot com
Target Milestone: ---
Created attachment 40283
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40283&action=edit
testcase
On x86_64 Linux:
$
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: dabler at gmail dot com
If the __attribute((aligned(...))) is used on structure, a size reported by
sizeof(...) operator is affected. Example:
struct strtype {
int i;
} __attribute((aligned(64
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60360
--- Comment #1 from DaBler ---
Created attachment 32227
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32227&action=edit
he preprocessed file that triggers the bug
Output:
64 64
64 64
4 64
4 64
4 64
Expected output:
4 64
4 64
4 64
4 64
4 6
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60360
--- Comment #2 from DaBler ---
The output of gcc -v:
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.3/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured wi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60360
--- Comment #4 from DaBler ---
I see no reason why should not another variable be padded after struct as well.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60360
--- Comment #6 from DaBler ---
When I call sizeof(...) on the int type (instead of a variable), it is the
same:
typedef int TypeInt __attribute((aligned(64)));
printf("%zu %zu\n", sizeof(TypeInt), alignof(TypeInt)); // Output: 4 64
Moreover, It
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: dabler at gmail dot com
Target Milestone: ---
I have found that manually calculating the % operator on __int128 is
significantly faster than the built-in compiler operator. I will show you how