aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-06-09Darwin, PPC: Fix struct layout with pragma pack [PR110044].Iain Sandoe5-1/+108
This bug was essentially that darwin_rs6000_special_round_type_align() was ignoring externally-imposed capping of field alignment. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> PR target/110044 gcc/ChangeLog: * config/rs6000/rs6000.c (darwin_rs6000_special_round_type_align): Make sure that we do not have a cap on field alignment before altering the struct layout based on the type alignment of the first entry. gcc/testsuite/ChangeLog: * gcc.target/powerpc/darwin-abi-13-0.c: New test. * gcc.target/powerpc/darwin-abi-13-1.c: New test. * gcc.target/powerpc/darwin-abi-13-2.c: New test. * gcc.target/powerpc/darwin-structs-0.h: New test. (cherry picked from commit 84d080a29a780973bef47171ba708ae2f7b4ee47)
2023-06-09fortran: Fix ICE on pr96024.f90 on big-endian hosts [PR96024]Jakub Jelinek1-1/+2
The pr96024.f90 testcase ICEs on big-endian hosts. The problem is that length->val.integer is accessed after checking length->expr_type == EXPR_CONSTANT, but it is a CHARACTER constant which uses length->val.character union member instead and on big-endian we end up reading constant 0x100000000 rather than some small number on little-endian and if target doesn't have enough memory for 4 times that (i.e. 16GB allocation), it ICEs. 2023-06-09 Jakub Jelinek <jakub@redhat.com> PR fortran/96024 * primary.c (gfc_convert_to_structure_constructor): Only do constant string ctor length verification and truncation/padding if constant length has INTEGER type. (cherry picked from commit 4cf6e322adc19f927859e0a5edfa93cec4b8c844)
2023-06-09Daily bump.GCC Administrator1-1/+1
2023-06-08Daily bump.GCC Administrator1-1/+1
2023-06-07Daily bump.GCC Administrator1-1/+1
2023-06-06Daily bump.GCC Administrator1-1/+1
2023-06-05Daily bump.GCC Administrator1-1/+1
2023-06-04Daily bump.GCC Administrator1-1/+1
2023-06-03Daily bump.GCC Administrator1-1/+1
2023-06-02Daily bump.GCC Administrator2-1/+9
2023-06-01doc: Fix description of x86 -m32 option [PR109954]Jonathan Wakely1-1/+1
This option does not imply -march=i386 so it's incorrect to say it generates code that will run on "any i386 system". gcc/ChangeLog: PR target/109954 * doc/invoke.texi (x86 Options): Fix description of -m32 option. (cherry picked from commit eeb92704967875411416b0b9508aa6f49e8192fd)
2023-06-01Daily bump.GCC Administrator1-1/+1
2023-05-31Daily bump.GCC Administrator1-1/+1
2023-05-30Daily bump.GCC Administrator1-1/+1
2023-05-29Daily bump.GCC Administrator1-1/+1
2023-05-28Daily bump.GCC Administrator1-1/+1
2023-05-27Daily bump.GCC Administrator1-1/+1
2023-05-26Daily bump.GCC Administrator1-1/+1
2023-05-25Daily bump.GCC Administrator1-1/+1
2023-05-24Daily bump.GCC Administrator1-1/+1
2023-05-23Daily bump.GCC Administrator3-1/+14
2023-05-22Do not generate vmaddfp and vnmsubfpMichael Meissner2-17/+55
This is version 3 of the patch. This is essentially version 1 with the removal of changes to altivec.md, and cleanup of the comments. Version 2 generated the vmaddfp and vnmsubfp instructions if -Ofast was used, and those changes are deleted in this patch. The Altivec instructions vmaddfp and vnmsubfp have different rounding behaviors than the VSX xvmaddsp and xvnmsubsp instructions. In particular, generating these instructions seems to break Eigen on big endian systems. I have done bootstrap builds on power9 little endian (with both IEEE long double and IBM long double). I have also done the builds and test on a power8 big endian system (testing both 32-bit and 64-bit code generation). Chip has verified that it fixes the problem that Eigen encountered. Can I check this into the master GCC branch? After a burn-in period, can I check this patch into the active GCC branches? Thanks in advance. 2023-05-22 Michael Meissner <meissner@linux.ibm.com> gcc/ PR target/70243 * config/rs6000/vsx.md (vsx_fmav4sf4): Do not generate vmaddfp. Back port from master 04/10/2023. (vsx_nfmsv4sf4): Do not generate vnmsubfp. gcc/testsuite/ PR target/70243 * gcc.target/powerpc/pr70243.c: New test. Back port from master 04/10/2023.
2023-05-22Daily bump.GCC Administrator7-1/+89
2023-05-21libstdc++: Rename __null_terminated to avoid a collision with system headers.Iain Sandoe1-6/+6
r13-1073-g254e88b3d7e8ab made this change for experimental/bits/fs-path.h. The change is needed on the 10.x branch for bits/fs-path.h (it is not required on later branches since this header was reworked). Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> libstdc++-v3/ChangeLog: * include/bits/fs_path.h: Rename __null_terminated to __nul_terminated to avoid colliding with a macro in Darwin system headers.
2023-05-21libsanitizer, darwin: Unsupport Darwin >= 22 for now.Iain Sandoe1-1/+1
The mechanism for location dyld has altered from Darwin22 since dyld is now in the shared cache. The implemented mechanism for walking the cache uses Apple Blocks which GCC does not yet support, and the fallback to the original mechanism does not work there. Until a suitable work-around can be found, unsupport Darwin22+. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> libsanitizer/ChangeLog: * configure.tgt: Unsupport Darwin22+ until a mechanism can be found to locate dyld in the shared cache. (cherry picked from commit e722a1f42b28092c9f709a3f758fc4fe57db32b0)
2023-05-21Darwin, libgcc : Adjust min version supported for the OS.Iain Sandoe6-8/+63
Tools from later versions of the OS deprecate or fail to support earlier OS revisions. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> libgcc/ChangeLog: * config.host: Arrange to set min Darwin OS versions from the configured host version. * config/darwin10-unwind-find-enc-func.c: Do not use current headers, but declare the nexessary structures locally to the versions in use for Mac OSX 10.6. * config/t-darwin: Amend to handle configured min OS versions. * config/t-darwin-min-1: New. * config/t-darwin-min-5: New. * config/t-darwin-min-8: New. (cherry picked from commit 20b8779ea9bd82b26eeb195b30f695168cd7ae1d)
2023-05-21Darwin, crts: Fix a build warning.Iain Sandoe1-0/+1
We have a shim crt for Darwin10 that implements functionality missing in libSystem. Provide this with a prototype to silence the warning about this. libgcc/ChangeLog: * config/darwin10-unwind-find-enc-func.c: Include libgcc_tm.h. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> (cherry picked from commit 7a300b413a62e1989bd89064fd5594aabe371d3a)
2023-05-21Darwin, fixincludes: Handle Apple Blocks in objc/runtime.h.Iain Sandoe3-5/+117
The macOS 13 SDK has unguarded Apple Blocks use in objc/runtime.h which causes most of the objective-c tests to fail. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> fixincludes/ChangeLog: * fixincl.x: Regenerate. * inclhack.def (darwin_objc_runtime_1): New hack. * tests/base/objc/runtime.h: New file. (cherry picked from commit 046dc9d0d4683bab99d28983d8841ba3c56ef744)
2023-05-21Darwin, fixincludes: Handle MacOS13 SDK Apple-specific deprecations [PR107568].Iain Sandoe3-5/+70
The SDK for MacOS13 includes Apple-specific deprecations of some functions that are not deprecated in Posix, C or C++ and widely used in GCC. The fix makes the deprecation conditional on __APPLE_LOCAL_DEPRECATIONS so that end users may still observe them but they are hidden from normal compilations. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> PR target/107568 fixincludes/ChangeLog: * fixincl.x: Regenerate. * inclhack.def: Add a fix for MacOS13 SDK function deprecations in stdio.h. * tests/base/stdio.h (__deprecated_msg): New test. (cherry picked from commit 442d2bdc1d2a98aba0b18aeaa3e87fa946ac8031)
2023-05-21libgcc, Darwin: No early install for the compatibility libgcc_s.1.dylib.Iain Sandoe1-7/+14
On Darwin, GCC now uses a libgcc_s.1.1 for builtins and forwards the system unwinder. We do, however, build a backwards compatibility libgcc_s.1.dylib. However, this is not needed by GCC and can cause incorrect operation when DYLD_LIBRARY_PATH is in use. Since we do not need or use it during the build, the solution is to skip the installation into the $build/gcc directory. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> libgcc/ChangeLog: * config/t-slibgcc-darwin (install-darwin-libgcc-stubs): Skip the install of libgcc_s.1.dylib when the installation is into the build gcc directory. (cherry picked from commit 163f0f2267370575a9950e7e30a2c9cd72f559f0)
2023-05-21Darwin: Update rules for handling alignment of globals.Iain Sandoe7-12/+68
The current rule was too strict and has not been required since Darwin11. This relaxes the constraint to allow up to 2^28 alignment for non-common entities. Common is still restricted to a maximum aligment of 2^15. When the host is an older version of Darwin ( earlier that 11 ) then the existing constraint is still applied. Note that this is a host constraint not a target one (so that a compilation on 10.7 targeting 10.6 is allowed to use a greater alignment than the tools on 10.6 support). This matches the behaviour of clang. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> gcc/ChangeLog: * config.gcc: Emit L2_MAX_OFILE_ALIGNMENT with suitable values for the host. * config/darwin.c (darwin_emit_common): Error for alignment values > 32768. * config/darwin.h (MAX_OFILE_ALIGNMENT): Rework to use the configured L2_MAX_OFILE_ALIGNMENT. gcc/testsuite/ChangeLog: * gcc.dg/darwin-aligned-globals.c: New test. * gcc.dg/darwin-comm-1.c: New test. * gcc.dg/attr-aligned.c: Amend for new alignment values on Darwin. * gcc.target/i386/pr89261.c: Likewise. (cherry picked from commit 19bf83a9a068f2d5293b63c9300f99172b2d278d)
2023-05-21Daily bump.GCC Administrator1-1/+1
2023-05-20Daily bump.GCC Administrator1-1/+1
2023-05-19Daily bump.GCC Administrator1-1/+1
2023-05-18Daily bump.GCC Administrator1-1/+1
2023-05-17Daily bump.GCC Administrator1-1/+1
2023-05-16Daily bump.GCC Administrator1-1/+1
2023-05-15Daily bump.GCC Administrator1-1/+1
2023-05-14Daily bump.GCC Administrator1-1/+1
2023-05-13Daily bump.GCC Administrator1-1/+1
2023-05-12Daily bump.GCC Administrator1-1/+1
2023-05-11Daily bump.GCC Administrator1-1/+1
2023-05-10Daily bump.GCC Administrator3-1/+30
2023-05-09testsuite: Add further testcase for already fixed PR [PR109778]Jakub Jelinek2-0/+29
I came up with a testcase which reproduces all the way to r10-7469. LTO to avoid early inlining it, so that ccp handles rotates and not shifts before they are turned into rotates. 2023-05-09 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/109778 * gcc.dg/lto/pr109778_0.c: New test. * gcc.dg/lto/pr109778_1.c: New file. (cherry picked from commit c2cf2dc988eb93551fa1c01d3f8d73ef21f39dc5)
2023-05-09tree-ssa-ccp, wide-int: Fix up handling of [LR]ROTATE_EXPR in bitwise ccp ↵Jakub Jelinek3-4/+35
[PR109778] The following testcase is miscompiled, because bitwise ccp2 handles a rotate with a signed type incorrectly. Seems tree-ssa-ccp.cc has the only callers of wi::[lr]rotate with 3 arguments, all other callers just rotate in the right precision and I think work correctly. ccp works with widest_ints and so rotations by the excessive precision certainly don't match what it wants when it sees a rotate in some specific bitsize. Still, if it is unsigned rotate and the widest_int is zero extended from width, the functions perform left shift and logical right shift on the value and then at the end zero extend the result of left shift and uselessly also the result of logical right shift and return | of that. On the testcase we the signed char rrotate by 4 argument is CONSTANT -75 i.e. 0xffffffff....fffffb5 with mask 2. The mask is correctly rotated to 0x20, but because the 8-bit constant is sign extended to 192-bit one, the logical right shift by 4 doesn't yield expected 0xb, but gives 0xfffffffffff....ffffb, and then return wi::zext (left, width) | wi::zext (right, width); where left is 0xfffffff....fb50, so we return 0xfb instead of the expected 0x5b. The following patch fixes that by doing the zero extension in case of the right variable before doing wi::lrshift rather than after it. Also, wi::[lr]rotate widht width < precision always zero extends the result. I'm afraid it can't do better because it doesn't know if it is done for an unsigned or signed type, but the caller in this case knows that very well, so I've done the extension based on sgn in the caller. E.g. 0x5b rotated right (or left) by 4 with width 8 previously gave 0xb5, but sgn == SIGNED in widest_int it should be 0xffffffff....fffb5 instead. 2023-05-09 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/109778 * wide-int.h (wi::lrotate, wi::rrotate): Call wi::lrshift on wi::zext (x, width) rather than x if width != precision, rather than using wi::zext (right, width) after the shift. * tree-ssa-ccp.c (bit_value_binop): Call wi::ext on the results of wi::lrotate or wi::rrotate. * gcc.c-torture/execute/pr109778.c: New test. (cherry picked from commit a8302d2a4669984c7c287d12ef5b37cde6699c80)
2023-05-09Daily bump.GCC Administrator1-1/+1
2023-05-08Daily bump.GCC Administrator1-1/+1
2023-05-07Daily bump.GCC Administrator1-1/+1
2023-05-06Daily bump.GCC Administrator1-1/+1
2023-05-05Daily bump.GCC Administrator3-1/+26