User account creation filtered due to spam.

Bug 34010 - [4.9 Regression] ppc64 bad stdargs codegen for zero sized objects
Summary: [4.9 Regression] ppc64 bad stdargs codegen for zero sized objects
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.2.1
: P2 major
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-code
Depends on:
Blocks: 24306
  Show dependency treegraph
 
Reported: 2007-11-07 01:04 UTC by Mike Stump
Modified: 2015-10-16 17:46 UTC (History)
6 users (show)

See Also:
Host:
Target: powerpc-apple-darwin9, mips*-*-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2012-02-01 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Stump 2007-11-07 01:04:49 UTC
The fix for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24306 breaks -m64 struct-layout-1.c.

It breaks the abi of every target, which is wrong.  On ppc -m64, it results in a self inconsistent abi.

This correct fix would be to modify ix86_function_arg_boundary function to give PARM_BOUNDARY for zero sized objects.
Comment 1 Andrew Pinski 2012-02-01 23:01:37 UTC
A patch was posted here:
http://gcc.gnu.org/ml/gcc-patches/2012-01/msg01564.html
Comment 2 Jakub Jelinek 2012-03-13 12:46:48 UTC
4.4 branch is being closed, moving to 4.5.4 target.
Comment 3 Richard Biener 2012-07-02 12:27:51 UTC
The 4.5 branch is being closed, adjusting target milestone.
Comment 4 Jakub Jelinek 2013-04-12 15:16:36 UTC
GCC 4.6.4 has been released and the branch has been closed.
Comment 5 Richard Biener 2014-06-12 13:44:33 UTC
The 4.7 branch is being closed, moving target milestone to 4.8.4.
Comment 6 Jakub Jelinek 2014-12-19 13:27:43 UTC
GCC 4.8.4 has been released.
Comment 7 Aldy Hernandez 2015-03-12 17:38:42 UTC
From Mike's comment I see this should fail on ppc -m64, however on ppc64-linux I see:

[aldyh@gcc1-power7 gcc]$ make check-gcc RUNTESTFLAGS=struct-layout-1.exp
...
		=== gcc Summary ===

# of expected passes		140

[aldyh@gcc1-power7 gcc]$ make check-g++ RUNTESTFLAGS=struct-layout-1.exp
...
		=== g++ Summary ===

# of expected passes		150

Is this still an issue, is this only visible on darwin and/or mips, or is there another way to reproduce the problem?
Comment 8 Aldy Hernandez 2015-03-17 22:45:45 UTC
PING
Comment 9 mrs@gcc.gnu.org 2015-03-17 23:34:17 UTC
I haven't had a ppc64 box for years.  Either, the tests results mailing list or you'd have to ask one of the darwin ppc64 people.  Jack and Iain I think both still have ppc64 boxes.
Comment 10 Aldy Hernandez 2015-03-18 00:06:49 UTC
Segher, the only struct-layout-1.c failure I see that is related to PPC on the GCC test results list is yours for "-m32 -mpowerpc64" running on ppc64.  This is 32-bit powerpc but with the ppc64 instruction set, is it not?

Did this test ever work?

FAIL: tmpdir-gcc.dg-struct-layout-1/t002 c_compat_x_tst.o-c_compat_y_tst.o link
...from: https://gcc.gnu.org/ml/gcc-testresults/2015-03/msg01870.html

That is, is it legitimately a regression?
Comment 11 Segher Boessenkool 2015-03-18 18:44:35 UTC
Hi Aldy,

If the only thing failing is -m32 -mpowerpc64, that is likely another
problem.  Not likely a regression either (but I don't have testresults
around going back more than a year or so; it failed then).
Comment 12 amker 2015-04-03 06:31:26 UTC
(In reply to Segher Boessenkool from comment #11)
> Hi Aldy,
> 
> If the only thing failing is -m32 -mpowerpc64, that is likely another
> problem.  Not likely a regression either (but I don't have testresults
> around going back more than a year or so; it failed then).

Hmm, I saw same case failed at least on aarch64 bigendian, fsf-4.9 branch.

Not sure if same with this one, Here is log message:

spawn /.../obj/gcc2/gcc/xgcc -B/.../obj/gcc2/gcc/ -fno-diagnostics-show-caret -fdiagnostics-color=never -w -I/projects/.../src/gcc/gcc/testsuite/gcc.dg/compat -Wno-abi -DSKIP_DECIMAL_FLOAT -c -specs=aem-validation.specs -o c_compat_x_tst.o /.../obj/gcc2/gcc/testsuite/gcc10/gcc.dg-struct-layout-1//t028_x.c
In file included from /.../obj/gcc2/gcc/testsuite/gcc10/gcc.dg-struct-layout-1//t028_x.c:10:0:
/.../obj/gcc2/gcc/testsuite/gcc10/gcc.dg-struct-layout-1//t028_test.h: In function 'checkx2823':
/projects/.../src/gcc/gcc/testsuite/gcc.dg/compat/struct-layout-1_x2.h:11:22: internal compiler error: Segmentation fault
/projects/.../src/gcc/gcc/testsuite/gcc.dg/compat/struct-layout-1.h:777:27: note: in expansion of macro 'TX'
/.../obj/gcc2/gcc/testsuite/gcc10/gcc.dg-struct-layout-1//t028_test.h:24:1: note: in expansion of macro 'T'
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
compiler exited with status 1
output is:
In file included from /.../obj/gcc2/gcc/testsuite/gcc10/gcc.dg-struct-layout-1//t028_x.c:10:0:
/.../obj/gcc2/gcc/testsuite/gcc10/gcc.dg-struct-layout-1//t028_test.h: In function 'checkx2823':
/projects/.../src/gcc/gcc/testsuite/gcc.dg/compat/struct-layout-1_x2.h:11:22: internal compiler error: Segmentation fault
/projects/.../src/gcc/gcc/testsuite/gcc.dg/compat/struct-layout-1.h:777:27: note: in expansion of macro 'TX'
/.../obj/gcc2/gcc/testsuite/gcc10/gcc.dg-struct-layout-1//t028_test.h:24:1: note: in expansion of macro 'T'
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

FAIL: tmpdir-gcc.dg-struct-layout-1/t028 c_compat_x_tst.o compile,  (internal compiler error)
Comment 13 Richard Biener 2015-06-23 08:17:03 UTC
The gcc-4_8-branch is being closed, re-targeting regressions to 4.9.3.
Comment 14 mrs@gcc.gnu.org 2015-06-23 18:47:42 UTC
Update target milestone to nothing.
Comment 15 Richard Biener 2015-10-16 08:21:29 UTC
Assuming fixed then.
Comment 16 mrs@gcc.gnu.org 2015-10-16 17:46:30 UTC
I checked https://gcc.gnu.org/ml/gcc-testresults/2015-04/msg01438.html and the failure is gone.