[Bug target/26427] [4.2 Regression] with -fsection-anchors with zero sized structs
--- Comment #19 from pinskia at gcc dot gnu dot org 2006-06-08 22:45 --- (In reply to comment #18) > The regression was introduced by: Exposed by and not introduced. If you look at my patch which you approved, I had mentioned this failure when I fixed most of -fsection-anchors for Darwin. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427
[Bug target/26427] [4.2 Regression] with -fsection-anchors with zero sized structs
--- Comment #18 from mrs at apple dot com 2006-06-08 22:40 --- The regression was introduced by: 2006-04-30 David Edelsohn <[EMAIL PROTECTED]> * config/rs6000/rs6000.c (rs6000_override_options): Enable TARGET_NO_FP_IN_TOC for section anchors. (optimization_options): Enable section anchors for all non-"Objective" languages. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427
[Bug target/26427] [4.2 Regression] with -fsection-anchors with zero sized structs
--- Comment #17 from mrs at apple dot com 2006-06-08 22:26 --- This should be fixed now. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427
[Bug target/26427] [4.2 Regression] with -fsection-anchors with zero sized structs
--- Comment #16 from mrs at gcc dot gnu dot org 2006-06-08 22:23 --- Subject: Bug 26427 Author: mrs Date: Thu Jun 8 22:23:17 2006 New Revision: 114498 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114498 Log: PR target/26427 * config/darwin.c (darwin_asm_output_anchor): Disable -fsection-anchors on darwin for now. * config/darwin.h (TARGET_ASM_OUTPUT_ANCHOR): Likewise. * rs6000/rs6000.c (optimization_options): Likewise. testsuite: * gcc.dg/pr26427.c: Test to ensure that -fsection-anchors doesn't produce bad code on darwin. Added: trunk/gcc/testsuite/gcc.dg/pr26427.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/darwin.c trunk/gcc/config/darwin.h trunk/gcc/config/rs6000/rs6000.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427
[Bug target/26427] [4.2 Regression] with -fsection-anchors with zero sized structs
-- mmitchel at gcc dot gnu dot org changed: What|Removed |Added Priority|P3 |P2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427
[Bug target/26427] [4.2 Regression] with -fsection-anchors with zero sized structs
-- jsm28 at gcc dot gnu dot org changed: What|Removed |Added Target Milestone|--- |4.2.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427
[Bug target/26427] [4.2 Regression] with -fsection-anchors with zero sized structs
--- Comment #15 from geoffk at gcc dot gnu dot org 2006-06-01 21:49 --- After discussion with Mike, I don't think Andrew's fix is right either. If varasm.c wants to be able to predict memory layout, then what it needs to do is ensure that the memory layout is seen as a single unit by the linker. This can only be done by ensuring that the layout contains no linker-visible labels, that is all the labels inside the layout must start with 'L'. If this is done, then the linker is not involved and zero-sized objects can be zero sized. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427
[Bug target/26427] [4.2 Regression] with -fsection-anchors with zero sized structs
--- Comment #14 from howarth at nitro dot med dot uc dot edu 2006-06-01 00:21 --- Geoff, Then I assume you approve of Andrew Pinski's fix? I have uploaded the corrected patch that Andrew sent me which solves this problem in varasm.c. Or did you have a different approach in mind? Jack -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427
[Bug target/26427] [4.2 Regression] with -fsection-anchors with zero sized structs
--- Comment #13 from howarth at nitro dot med dot uc dot edu 2006-06-01 00:05 --- Created an attachment (id=11561) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11561&action=view) corrected patch as provided by Andrew -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427
[Bug target/26427] [4.2 Regression] with -fsection-anchors with zero sized structs
--- Comment #12 from geoffk at gcc dot gnu dot org 2006-05-31 22:48 --- The issue here is that Darwin does not support zero-sized objects in the linker. It just won't work. So, you need to make sure that the linker never sees them. This is presently done for Darwin by adding a byte of padding at the end of every zero-sized object. Note that from the user's point of view, the structure is still zero size; sizeof() will return 0. If varasm.c needs to know about this, then this logic should move there. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427
[Bug target/26427] [4.2 Regression] with -fsection-anchors with zero sized structs
--- Comment #11 from mrs at apple dot com 2006-05-31 22:32 --- I have a patch: http://gcc.gnu.org/ml/gcc-patches/2006-05/msg01580.html that I think fixes this problem. I'd be cusious to hear if it fixes the Fortran problem for you. -- mrs at apple dot com changed: What|Removed |Added CC||mrs at apple dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427
[Bug target/26427] [4.2 Regression] with -fsection-anchors with zero sized structs
--- Comment #10 from howarth at nitro dot med dot uc dot edu 2006-05-31 01:44 --- Andrew, I can confirm that the proposed patch (with the missing null check) resolves the new gfortran failures on Darwin. Could you update the patch in this PR to revised version with the null check though. Hopefully we can get this into the trunk soon. Jack -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427
[Bug target/26427] [4.2 Regression] with -fsection-anchors with zero sized structs
--- Comment #9 from pinskia at gcc dot gnu dot org 2006-05-29 23:10 --- (In reply to comment #8) Jack, it resolves both but it is just a hack around the fact that Darwin back-end goes behind the middle-end to change the size of the structs/arrays/string_csts to 1 from zero. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427
[Bug target/26427] [4.2 Regression] with -fsection-anchors with zero sized structs
--- Comment #8 from howarth at nitro dot med dot uc dot edu 2006-05-29 23:04 --- Andrew, I assume the new revised patch still only addresses the original PR 26427 test case and doesn't resolve the gfortran testsuite failures in PR 27683. If PR 27683 isn't really a duplicate of PR 26427 as you originally thought, shouldn't PR 27683 be reopened? Jack -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427
[Bug target/26427] [4.2 Regression] with -fsection-anchors with zero sized structs
--- Comment #7 from pinskia at gcc dot gnu dot org 2006-05-29 21:08 --- Mike since you approved my orginal patch to fix some of -fsection-anchors and I reported this bug back with that patch, could you look into fixing this? -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||mrs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427
[Bug target/26427] [4.2 Regression] with -fsection-anchors with zero sized structs
--- Comment #6 from pinskia at gcc dot gnu dot org 2006-05-29 21:06 --- Created an attachment (id=11532) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11532&action=view) new patch which again works around darwin back-end mess -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Attachment #11517|0 |1 is obsolete|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427
[Bug target/26427] [4.2 Regression] with -fsection-anchors with zero sized structs
--- Comment #5 from pinskia at gcc dot gnu dot org 2006-05-27 04:11 --- Created an attachment (id=11517) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11517&action=view) patch which fixes part of the problem This fixes the C testcase but it does not fix the Fortran issue but I don't think the fortran issue is a target back-end issue now since darwin_use_anchors_for_symbol_p does return false for the rtx. I am off to the bar for tonight so I cannot test this or fix the fortran issue. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427