Merge lp:~rsandifo/gcc-linaro/lp721531-4.6 into lp:gcc-linaro/4.6

Proposed by Richard Sandiford
Status: Merged
Merged at revision: 106768
Proposed branch: lp:~rsandifo/gcc-linaro/lp721531-4.6
Merge into: lp:gcc-linaro/4.6
Diff against target: 199 lines (+97/-20) (has conflicts)
5 files modified
ChangeLog.linaro (+53/-0)
gcc/builtins.c (+23/-2)
gcc/fold-const.c (+6/-14)
gcc/testsuite/gcc.dg/torture/pr49169.c (+15/-0)
gcc/tree-ssa-ccp.c (+0/-4)
Text conflict in ChangeLog.linaro
To merge this branch: bzr merge lp:~rsandifo/gcc-linaro/lp721531-4.6
Reviewer Review Type Date Requested Status
Ramana Radhakrishnan (community) Approve
Review via email: mp+66763@code.launchpad.net

This proposal supersedes a proposal from 2011-06-29.

Description of the change

This version includes some branch-local changes to account
for differences in the handling of PR 35705. In mainline,
get_pointer_and_residue reuses get_object_alignment,
but that improvement isn't in 4.6and earlier. This backport
just reuses get_object_alignment for the simple and safe*
case of DECLs.

(PR 35705 was about optimising away checks for bit 1 (rather than bit 0)
in a HPPA function address. This patch subsumes that one.

To post a comment you must log in.
Revision history for this message
Linaro Toolchain Builder (cbuild) wrote : Posted in a previous version of this proposal

cbuild has taken a snapshot of this branch at r106754 and queued it for build.

The snapshot is available at:
 http://ex.seabright.co.nz/snapshots/gcc-linaro-4.6+bzr106754~rsandifo~lp721531-4.6.tar.xdelta3.xz

and will be built on the following builders:
 a9-builder armv5-builder i686 x86_64

You can track the build queue at:
 http://ex.seabright.co.nz/helpers/scheduler

cbuild-snapshot: gcc-linaro-4.6+bzr106754~rsandifo~lp721531-4.6
cbuild-ancestor: lp:gcc-linaro/4.6+bzr106753
cbuild-state: check

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote : Posted in a previous version of this proposal

cbuild successfully built this on i686-lucid-cbuild136-scorpius-i686r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106754~rsandifo~lp721531-4.6/logs/i686-lucid-cbuild136-scorpius-i686r1

The test suite results changed compared to the branch point lp:gcc-linaro/4.6+bzr106753:
 +PASS: gcc.dg/torture/pr49169.c -O0 (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O1 (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O2 -flto -flto-partition=none (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O2 -flto (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O2 (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O3 -fomit-frame-pointer (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O3 -g (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -Os (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 -PASS: g++.dg/cpp0x/constexpr-ptrmem.C (test for excess errors)
 +FAIL: g++.dg/cpp0x/constexpr-ptrmem.C (test for excess errors)
 -PASS: g++.dg/tree-ssa/fwprop-align.C scan-tree-dump-times forwprop2 "& 1" 0
 +FAIL: g++.dg/tree-ssa/fwprop-align.C scan-tree-dump-times forwprop2 "& 1" 0

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106754~rsandifo~lp721531-4.6/logs/i686-lucid-cbuild136-scorpius-i686r1/gcc-testsuite.txt

cbuild-checked: i686-lucid-cbuild136-scorpius-i686r1

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote : Posted in a previous version of this proposal

cbuild has taken a snapshot of this branch at r106755 and queued it for build.

The snapshot is available at:
 http://ex.seabright.co.nz/snapshots/gcc-linaro-4.6+bzr106755~rsandifo~lp721531-4.6.tar.xdelta3.xz

and will be built on the following builders:
 a9-builder armv5-builder i686 x86_64

You can track the build queue at:
 http://ex.seabright.co.nz/helpers/scheduler

cbuild-snapshot: gcc-linaro-4.6+bzr106755~rsandifo~lp721531-4.6
cbuild-ancestor: lp:gcc-linaro/4.6+bzr106753
cbuild-state: check

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote : Posted in a previous version of this proposal

cbuild successfully built this on i686-lucid-cbuild140-scorpius-i686r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106755~rsandifo~lp721531-4.6/logs/i686-lucid-cbuild140-scorpius-i686r1

The test suite results changed compared to the branch point lp:gcc-linaro/4.6+bzr106753:
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O0
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O1
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O2
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O2 -flto
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O2 -flto -flto-partition=none
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O3 -fomit-frame-pointer
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O3 -g
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -Os

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106755~rsandifo~lp721531-4.6/logs/i686-lucid-cbuild140-scorpius-i686r1/gcc-testsuite.txt

cbuild-checked: i686-lucid-cbuild140-scorpius-i686r1

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote : Posted in a previous version of this proposal

cbuild successfully built this on armv7l-natty-cbuild142-ursa2-cortexa9r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106755~rsandifo~lp721531-4.6/logs/armv7l-natty-cbuild142-ursa2-cortexa9r1

The test suite results changed compared to the branch point lp:gcc-linaro/4.6+bzr106753:
 +PASS: gcc.dg/torture/pr49169.c -O0 (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O1 (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O2 -flto -flto-partition=none (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O2 -flto (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O2 (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O3 -fomit-frame-pointer (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O3 -g (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -Os (test for excess errors)
 +FAIL: gcc.dg/torture/pr49169.c scan-assembler abort
 +FAIL: gcc.dg/torture/pr49169.c scan-assembler abort
 +FAIL: gcc.dg/torture/pr49169.c scan-assembler abort
 +FAIL: gcc.dg/torture/pr49169.c scan-assembler abort
 +FAIL: gcc.dg/torture/pr49169.c scan-assembler abort
 +FAIL: gcc.dg/torture/pr49169.c scan-assembler abort
 +FAIL: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106755~rsandifo~lp721531-4.6/logs/armv7l-natty-cbuild142-ursa2-cortexa9r1/gcc-testsuite.txt

cbuild-checked: armv7l-natty-cbuild142-ursa2-cortexa9r1

Revision history for this message
Michael Hope (michaelh1) wrote : Posted in a previous version of this proposal

Does the test case assume the compiler is built for a certain mode?

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote : Posted in a previous version of this proposal

cbuild successfully built this on x86_64-natty-cbuild144-oort3-x86_64r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106755~rsandifo~lp721531-4.6/logs/x86_64-natty-cbuild144-oort3-x86_64r1

The test suite results changed compared to the branch point lp:gcc-linaro/4.6+bzr106753:
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O0
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O1
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O2
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O2 -flto
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O2 -flto -flto-partition=none
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O3 -fomit-frame-pointer
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O3 -g
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -Os

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106755~rsandifo~lp721531-4.6/logs/x86_64-natty-cbuild144-oort3-x86_64r1/gcc-testsuite.txt

cbuild-checked: x86_64-natty-cbuild144-oort3-x86_64r1

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote : Posted in a previous version of this proposal

cbuild successfully built this on armv7l-natty-cbuild144-ursa1-armv5r2.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106755~rsandifo~lp721531-4.6/logs/armv7l-natty-cbuild144-ursa1-armv5r2

The test suite was not checked as the branch point lp:gcc-linaro/4.6+bzr106753 has nothing to compare against.

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106755~rsandifo~lp721531-4.6/logs/armv7l-natty-cbuild144-ursa1-armv5r2/gcc-testsuite.txt

cbuild-checked: armv7l-natty-cbuild144-ursa1-armv5r2

Revision history for this message
Richard Sandiford (rsandifo) wrote : Posted in a previous version of this proposal

Michael Hope <email address hidden> writes:
> Does the test case assume the compiler is built for a certain mode?

It isn't supposed to. Investigating...

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :

cbuild has taken a snapshot of this branch at r106756 and queued it for build.

The snapshot is available at:
 http://ex.seabright.co.nz/snapshots/gcc-linaro-4.6+bzr106756~rsandifo~lp721531-4.6.tar.xdelta3.xz

and will be built on the following builders:
 a9-builder armv5-builder i686 x86_64

You can track the build queue at:
 http://ex.seabright.co.nz/helpers/scheduler

cbuild-snapshot: gcc-linaro-4.6+bzr106756~rsandifo~lp721531-4.6
cbuild-ancestor: lp:gcc-linaro/4.6+bzr106753
cbuild-state: check

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :

cbuild successfully built this on x86_64-natty-cbuild148-oort1-x86_64r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106756~rsandifo~lp721531-4.6/logs/x86_64-natty-cbuild148-oort1-x86_64r1

The test suite results changed compared to the branch point lp:gcc-linaro/4.6+bzr106753:
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O0
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O1
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O2
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O2 -flto
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O2 -flto -flto-partition=none
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O3 -fomit-frame-pointer
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O3 -g
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -Os

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106756~rsandifo~lp721531-4.6/logs/x86_64-natty-cbuild148-oort1-x86_64r1/gcc-testsuite.txt

cbuild-checked: x86_64-natty-cbuild148-oort1-x86_64r1

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :

cbuild successfully built this on armv7l-natty-cbuild148-ursa2-cortexa9r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106756~rsandifo~lp721531-4.6/logs/armv7l-natty-cbuild148-ursa2-cortexa9r1

The test suite results changed compared to the branch point lp:gcc-linaro/4.6+bzr106753:
 +PASS: gcc.dg/torture/pr49169.c -O0 (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O1 (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O2 -flto -flto-partition=none (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O2 -flto (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O2 (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O3 -fomit-frame-pointer (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O3 -g (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -Os (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 -WARNING: program timed out.

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106756~rsandifo~lp721531-4.6/logs/armv7l-natty-cbuild148-ursa2-cortexa9r1/gcc-testsuite.txt

cbuild-checked: armv7l-natty-cbuild148-ursa2-cortexa9r1

Revision history for this message
Ramana Radhakrishnan (ramana) wrote :

This is Ok.

Ramana

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ChangeLog.linaro'
--- ChangeLog.linaro 2011-07-03 09:08:14 +0000
+++ ChangeLog.linaro 2011-07-04 10:08:02 +0000
@@ -1,3 +1,4 @@
1<<<<<<< TREE
12011-07-03 Ira Rosen <ira.rosen@linaro.org>22011-07-03 Ira Rosen <ira.rosen@linaro.org>
23
3 Backport from FSF:4 Backport from FSF:
@@ -293,6 +294,58 @@
293 gcc/testsuite/294 gcc/testsuite/
294 * gcc.target/arm/mla-2.c: New test.295 * gcc.target/arm/mla-2.c: New test.
295296
297=======
2982011-07-04 Richard Sandiford <richard.sandiford@linaro.org>
299
300 gcc/
301 * builtins.c (get_object_alignment): Fix comment.
302 * fold-const.c (get_pointer_modulus_and_residue): Remove
303 allow_func_align. Use get_object_alignment.
304 (fold_binary_loc): Update caller.
305
3062011-06-29 Richard Sandiford <richard.sandiford@linaro.org>
307
308 gcc/
309 Backport from mainline:
310
311 2011-06-29 Richard Sandiford <richard.sandiford@linaro.org>
312
313 PR tree-optimization/49545
314 * builtins.c (get_object_alignment_1): Update function comment.
315 Do not use DECL_ALIGN for functions, but test
316 TARGET_PTRMEMFUNC_VBIT_LOCATION instead.
317 * fold-const.c (get_pointer_modulus_and_residue): Don't check
318 for functions here.
319 * tree-ssa-ccp.c (get_value_from_alignment): Likewise.
320
321 gcc/testsuite/
322 Backport from mainline:
323
324 2011-06-29 Richard Sandiford <richard.sandiford@linaro.org>
325
326 * gcc.dg/torture/pr49169.c: Restrict to ARM and MIPS targets.
327
3282011-06-27 Richard Sandiford <richard.sandiford@linaro.org>
329
330 gcc/
331 Backport from mainline:
332
333 2011-07-27 Richard Guenther <rguenther@suse.de>
334
335 PR tree-optimization/49169
336 * fold-const.c (get_pointer_modulus_and_residue): Don't rely on
337 the alignment of function decls.
338
339 gcc/testsuite/
340 Backport from mainline:
341
342 2011-07-27 Michael Hope <michael.hope@linaro.org>
343 Richard Sandiford <richard.sandiford@linaro.org>
344
345 PR tree-optimization/49169
346 * gcc.dg/torture/pr49169.c: New test.
347
348>>>>>>> MERGE-SOURCE
2962001-06-02 Richard Sandiford <richard.sandiford@linaro.org>3492001-06-02 Richard Sandiford <richard.sandiford@linaro.org>
297350
298 gcc/351 gcc/
299352
=== modified file 'gcc/builtins.c'
--- gcc/builtins.c 2011-03-03 21:56:58 +0000
+++ gcc/builtins.c 2011-07-04 10:08:02 +0000
@@ -264,7 +264,14 @@
264}264}
265265
266/* Return the alignment in bits of EXP, an object.266/* Return the alignment in bits of EXP, an object.
267 Don't return more than MAX_ALIGN no matter what. */267 Don't return more than MAX_ALIGN no matter what.
268
269 Note that the address (and thus the alignment) computed here is based
270 on the address to which a symbol resolves, whereas DECL_ALIGN is based
271 on the address at which an object is actually located. These two
272 addresses are not always the same. For example, on ARM targets,
273 the address &foo of a Thumb function foo() has the lowest bit set,
274 whereas foo() itself starts on an even address. */
268275
269unsigned int276unsigned int
270get_object_alignment (tree exp, unsigned int max_align)277get_object_alignment (tree exp, unsigned int max_align)
@@ -286,7 +293,21 @@
286 exp = DECL_INITIAL (exp);293 exp = DECL_INITIAL (exp);
287 if (DECL_P (exp)294 if (DECL_P (exp)
288 && TREE_CODE (exp) != LABEL_DECL)295 && TREE_CODE (exp) != LABEL_DECL)
289 align = DECL_ALIGN (exp);296 {
297 if (TREE_CODE (exp) == FUNCTION_DECL)
298 {
299 /* Function addresses can encode extra information besides their
300 alignment. However, if TARGET_PTRMEMFUNC_VBIT_LOCATION
301 allows the low bit to be used as a virtual bit, we know
302 that the address itself must be 2-byte aligned. */
303 if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn)
304 align = 2 * BITS_PER_UNIT;
305 else
306 align = BITS_PER_UNIT;
307 }
308 else
309 align = DECL_ALIGN (exp);
310 }
290 else if (CONSTANT_CLASS_P (exp))311 else if (CONSTANT_CLASS_P (exp))
291 {312 {
292 align = TYPE_ALIGN (TREE_TYPE (exp));313 align = TYPE_ALIGN (TREE_TYPE (exp));
293314
=== modified file 'gcc/fold-const.c'
--- gcc/fold-const.c 2011-05-23 20:37:18 +0000
+++ gcc/fold-const.c 2011-07-04 10:08:02 +0000
@@ -9232,15 +9232,10 @@
9232 0 <= N < M as is common. In general, the precise value of P is unknown.9232 0 <= N < M as is common. In general, the precise value of P is unknown.
9233 M is chosen as large as possible such that constant N can be determined.9233 M is chosen as large as possible such that constant N can be determined.
92349234
9235 Returns M and sets *RESIDUE to N.9235 Returns M and sets *RESIDUE to N. */
9236
9237 If ALLOW_FUNC_ALIGN is true, do take functions' DECL_ALIGN_UNIT into
9238 account. This is not always possible due to PR 35705.
9239 */
92409236
9241static unsigned HOST_WIDE_INT9237static unsigned HOST_WIDE_INT
9242get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue,9238get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue)
9243 bool allow_func_align)
9244{9239{
9245 enum tree_code code;9240 enum tree_code code;
92469241
@@ -9270,9 +9265,8 @@
9270 }9265 }
9271 }9266 }
92729267
9273 if (DECL_P (expr)9268 if (DECL_P (expr))
9274 && (allow_func_align || TREE_CODE (expr) != FUNCTION_DECL))9269 return get_object_alignment (expr, ~0U) / BITS_PER_UNIT;
9275 return DECL_ALIGN_UNIT (expr);
9276 }9270 }
9277 else if (code == POINTER_PLUS_EXPR)9271 else if (code == POINTER_PLUS_EXPR)
9278 {9272 {
@@ -9282,8 +9276,7 @@
92829276
9283 op0 = TREE_OPERAND (expr, 0);9277 op0 = TREE_OPERAND (expr, 0);
9284 STRIP_NOPS (op0);9278 STRIP_NOPS (op0);
9285 modulus = get_pointer_modulus_and_residue (op0, residue,9279 modulus = get_pointer_modulus_and_residue (op0, residue);
9286 allow_func_align);
92879280
9288 op1 = TREE_OPERAND (expr, 1);9281 op1 = TREE_OPERAND (expr, 1);
9289 STRIP_NOPS (op1);9282 STRIP_NOPS (op1);
@@ -11163,8 +11156,7 @@
11163 unsigned HOST_WIDE_INT modulus, residue;11156 unsigned HOST_WIDE_INT modulus, residue;
11164 unsigned HOST_WIDE_INT low = TREE_INT_CST_LOW (arg1);11157 unsigned HOST_WIDE_INT low = TREE_INT_CST_LOW (arg1);
1116511158
11166 modulus = get_pointer_modulus_and_residue (arg0, &residue,11159 modulus = get_pointer_modulus_and_residue (arg0, &residue);
11167 integer_onep (arg1));
1116811160
11169 /* This works because modulus is a power of 2. If this weren't the11161 /* This works because modulus is a power of 2. If this weren't the
11170 case, we'd have to replace it by its greatest power-of-211162 case, we'd have to replace it by its greatest power-of-2
1117111163
=== added file 'gcc/testsuite/gcc.dg/torture/pr49169.c'
--- gcc/testsuite/gcc.dg/torture/pr49169.c 1970-01-01 00:00:00 +0000
+++ gcc/testsuite/gcc.dg/torture/pr49169.c 2011-07-04 10:08:02 +0000
@@ -0,0 +1,15 @@
1/* { dg-do compile { target { arm*-*-* || mips*-*-* } } } */
2
3#include <stdlib.h>
4#include <stdint.h>
5
6int
7main (void)
8{
9 void *p = main;
10 if ((intptr_t) p & 1)
11 abort ();
12 return 0;
13}
14
15/* { dg-final { scan-assembler "abort" } } */
016
=== modified file 'gcc/tree-ssa-ccp.c'
--- gcc/tree-ssa-ccp.c 2011-05-05 15:42:22 +0000
+++ gcc/tree-ssa-ccp.c 2011-07-04 10:08:02 +0000
@@ -522,10 +522,6 @@
522 val = bit_value_binop (PLUS_EXPR, TREE_TYPE (expr),522 val = bit_value_binop (PLUS_EXPR, TREE_TYPE (expr),
523 TREE_OPERAND (base, 0), TREE_OPERAND (base, 1));523 TREE_OPERAND (base, 0), TREE_OPERAND (base, 1));
524 else if (base524 else if (base
525 /* ??? While function decls have DECL_ALIGN their addresses
526 may encode extra information in the lower bits on some
527 targets (PR47239). Simply punt for function decls for now. */
528 && TREE_CODE (base) != FUNCTION_DECL
529 && ((align = get_object_alignment (base, BIGGEST_ALIGNMENT))525 && ((align = get_object_alignment (base, BIGGEST_ALIGNMENT))
530 > BITS_PER_UNIT))526 > BITS_PER_UNIT))
531 {527 {

Subscribers

People subscribed via source and target branches