http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #15 from Jason Merrill jason at gcc dot gnu.org ---
(In reply to Andrew Pinski from comment #7)
No this testcase is not valid at all. See
http://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/Empty-Structures.html#Empty-
Structures where it
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
H.J. Lu hjl.tools at gmail dot com changed:
What|Removed |Added
CC||hjl.tools at gmail
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #17 from Uroš Bizjak ubizjak at gmail dot com ---
(In reply to Jason Merrill from comment #15)
That only documents that sizeof is different for C and C++, the calling
convention should be the same. And it seems like
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #18 from Jason Merrill jason at gcc dot gnu.org ---
(In reply to Uroš Bizjak from comment #17)
classify_argument has an early exit:
/* Zero sized arrays or structures are NO_CLASS. We return 0 to
signalize memory
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #19 from Jason Merrill jason at gcc dot gnu.org ---
Created attachment 32228
-- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32228action=edit
HJ's test in dejagnu form
Here's HJ's testcase in a form that can be dropped into
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #20 from Uroš Bizjak ubizjak at gmail dot com ---
(In reply to H.J. Lu from comment #4)
Can someone try this on non-x86 targets?
gcc110 (ppc64) from the compile farm:
[uros@gcc1-power7 ~]$ gcc -c fun.i
[uros@gcc1-power7 ~]$ gcc -c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #21 from Andrew Pinski pinskia at gcc dot gnu.org ---
(In reply to Marc Glisse from comment #12)
It is a bit alarming that gcc, clang and clang++ use one ABI and g++ uses a
different (inferior) one (the incompatibility with clang++
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
H.J. Lu hjl.tools at gmail dot com changed:
What|Removed |Added
Summary|va_start corrupts 6-th |empty struct value is
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #5 from Uroš Bizjak ubizjak at gmail dot com ---
(In reply to Andrew Pinski from comment #3)
It is a target bug if it is passing on the stack. Note in C++, the size of
the struct is 1 while in C, the size is 0.
Changing the
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #6 from Uroš Bizjak ubizjak at gmail dot com ---
(In reply to H.J. Lu from comment #4)
Can someone try this on non-x86 targets?
I get abort on alpha:
$ gcc -c fun.i
$ gcc -c x.ii
$ g++ fun.o x.o
$ ./a.out
Aborted
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #7 from Andrew Pinski pinskia at gcc dot gnu.org ---
(In reply to H.J. Lu from comment #4)
Is this test valid? BTW, clang works fine on x86.
No this testcase is not valid at all. See
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #8 from H.J. Lu hjl.tools at gmail dot com ---
This works:
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 00773d8..16669b9 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -7193,6 +7193,7 @@
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #9 from vagran vagran.ast at gmail dot com ---
(In reply to Andrew Pinski from comment #7)
(In reply to H.J. Lu from comment #4)
Is this test valid? BTW, clang works fine on x86.
No this testcase is not valid at all. See
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #10 from Andrew Pinski pinskia at gcc dot gnu.org ---
(In reply to vagran from comment #9)
(In reply to Andrew Pinski from comment #7)
(In reply to H.J. Lu from comment #4)
Is this test valid? BTW, clang works fine on x86.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #11 from H.J. Lu hjl.tools at gmail dot com ---
This patch may be better:
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 00773d8..426146a 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -6842,7
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #12 from Marc Glisse glisse at gcc dot gnu.org ---
It is a bit alarming that gcc, clang and clang++ use one ABI and g++ uses a
different (inferior) one (the incompatibility with clang++ should affect some
standard library functions,
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #13 from H.J. Lu hjl.tools at gmail dot com ---
Passing
struct dummy { };
is still odd for g++. It is supposed to have a single member of type char,
which should be passed in register, not on stack.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #14 from H.J. Lu hjl.tools at gmail dot com ---
(In reply to H.J. Lu from comment #13)
Passing
struct dummy { };
is still odd for g++. It is supposed to have a single member of type char,
which should be passed in register,
18 matches
Mail list logo