GCC Bugzilla – Attachment 8849 Details for
Bug 20607
[3.4 Regression] -fstrict-aliasing causes incorrect scheduling
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch.
pr20607.patch (text/plain), 1.63 KB, created by
Mark Mitchell
on 2005-05-10 03:12:12 UTC
(
hide
)
Description:
Proposed patch.
Filename:
MIME Type:
Creator:
Mark Mitchell
Created:
2005-05-10 03:12:12 UTC
Size:
1.63 KB
patch
obsolete
>Index: typeck.c >=================================================================== >RCS file: /cvs/gcc/gcc/gcc/cp/typeck.c,v >retrieving revision 1.519.2.27 >diff -c -5 -p -r1.519.2.27 typeck.c >*** typeck.c 2 May 2005 18:38:43 -0000 1.519.2.27 >--- typeck.c 10 May 2005 03:10:05 -0000 >*************** build_unary_op (enum tree_code code, tre >*** 4120,4142 **** > TREE_OPERAND (arg, 1)); > return error_mark_node; > } > else > { >! /* Unfortunately we cannot just build an address >! expression here, because we would not handle >! address-constant-expressions or offsetof correctly. */ > tree field = TREE_OPERAND (arg, 1); >! tree rval = build_unary_op (ADDR_EXPR, TREE_OPERAND (arg, 0), 0); >! tree binfo = lookup_base (TREE_TYPE (TREE_TYPE (rval)), >! decl_type_context (field), >! ba_check, NULL); >! >! rval = build_base_path (PLUS_EXPR, rval, binfo, 1); >! rval = build_nop (argtype, rval); >! addr = fold (build (PLUS_EXPR, argtype, rval, >! cp_convert (argtype, byte_position (field)))); > } > > if (TREE_CODE (argtype) == POINTER_TYPE > && TREE_CODE (TREE_TYPE (argtype)) == METHOD_TYPE) > { >--- 4120,4135 ---- > TREE_OPERAND (arg, 1)); > return error_mark_node; > } > else > { >! tree object = TREE_OPERAND (arg, 0); > tree field = TREE_OPERAND (arg, 1); >! if (!same_type_ignoring_top_level_qualifiers_p >! (TREE_TYPE (object), decl_type_context (field))) >! abort (); >! addr = build_address (arg); > } > > if (TREE_CODE (argtype) == POINTER_TYPE > && TREE_CODE (TREE_TYPE (argtype)) == METHOD_TYPE) > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 20607
:
8436
|
8437
| 8849