[Bug c++/50608] [4.6/4.7 regression] cannot apply 'offsetof' to a non-constant address
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50608 --- Comment #9 from amker at gcc dot gnu.org 2012-06-12 03:11:03 UTC --- Author: amker Date: Tue Jun 12 03:10:55 2012 New Revision: 188418 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188418 Log: Backport r180986 from mainline 2011-11-04 Eric Botcazou PR c++/50608 * c-common.c (c_fully_fold_internal) : Call fold_offsetof_1. (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust. : Return the argument. : Remove special code for negative offset. Call fold_build_pointer_plus instead of size_binop. (fold_offsetof): Remove STOP_REF argument and adjust. * c-common.h (fold_offsetof_1): Declare. (fold_offsetof): Remove STOP_REF argument. PR c++/50608 * c-parser.c (c_parser_postfix_expression) : Adjust call to fold_offsetof. * c-typeck.c (build_unary_op) : Call fold_offsetof_1. * g++.dg/other/offsetof7.C: New test. PR c++/50608 * semantics.c (finish_offsetof): Adjust call to fold_offsetof. * typeck.c (cp_build_addr_expr_1): Call fold_offsetof_1. Added: branches/ARM/embedded-4_6-branch/gcc/c-family/ChangeLog.arm branches/ARM/embedded-4_6-branch/gcc/cp/ChangeLog.arm branches/ARM/embedded-4_6-branch/gcc/testsuite/g++.dg/other/offsetof7.C Modified: branches/ARM/embedded-4_6-branch/gcc/ChangeLog.arm branches/ARM/embedded-4_6-branch/gcc/c-family/c-common.c branches/ARM/embedded-4_6-branch/gcc/c-family/c-common.h branches/ARM/embedded-4_6-branch/gcc/c-parser.c branches/ARM/embedded-4_6-branch/gcc/c-typeck.c branches/ARM/embedded-4_6-branch/gcc/cp/semantics.c branches/ARM/embedded-4_6-branch/gcc/cp/typeck.c branches/ARM/embedded-4_6-branch/gcc/testsuite/ChangeLog.arm
[Bug c++/50608] [4.6/4.7 regression] cannot apply 'offsetof' to a non-constant address
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50608 Eric Botcazou changed: What|Removed |Added Status|ASSIGNED|RESOLVED Version|4.6.1 |4.6.3 Resolution||FIXED --- Comment #8 from Eric Botcazou 2011-11-04 21:52:41 UTC --- Patch applied.
[Bug c++/50608] [4.6/4.7 regression] cannot apply 'offsetof' to a non-constant address
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50608 --- Comment #7 from Eric Botcazou 2011-11-04 21:49:52 UTC --- Author: ebotcazou Date: Fri Nov 4 21:49:49 2011 New Revision: 180988 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180988 Log: 2011-11-04 Eric Botcazou PR c++/50608 * c-parser.c (c_parser_postfix_expression) : Adjust call to fold_offsetof. * c-typeck.c (build_unary_op) : Call fold_offsetof_1. c-family/ * c-common.c (c_fully_fold_internal) : Call fold_offsetof_1. (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust. : Return the argument. : Remove special code for negative offset. Call fold_build_pointer_plus instead of size_binop. (fold_offsetof): Remove STOP_REF argument and adjust. * c-common.h (fold_offsetof_1): Declare. (fold_offsetof): Remove STOP_REF argument. cp/ * semantics.c (finish_offsetof): Adjust call to fold_offsetof. * typeck.c (cp_build_addr_expr_1): Call fold_offsetof_1. Added: branches/gcc-4_6-branch/gcc/testsuite/g++.dg/other/offsetof7.C Modified: branches/gcc-4_6-branch/gcc/ChangeLog branches/gcc-4_6-branch/gcc/c-family/ChangeLog branches/gcc-4_6-branch/gcc/c-family/c-common.c branches/gcc-4_6-branch/gcc/c-family/c-common.h branches/gcc-4_6-branch/gcc/c-parser.c branches/gcc-4_6-branch/gcc/c-typeck.c branches/gcc-4_6-branch/gcc/cp/ChangeLog branches/gcc-4_6-branch/gcc/cp/semantics.c branches/gcc-4_6-branch/gcc/cp/typeck.c branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
[Bug c++/50608] [4.6/4.7 regression] cannot apply 'offsetof' to a non-constant address
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50608 --- Comment #6 from Eric Botcazou 2011-11-04 21:46:10 UTC --- Author: ebotcazou Date: Fri Nov 4 21:46:07 2011 New Revision: 180986 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180986 Log: 2011-11-04 Eric Botcazou PR c++/50608 * c-parser.c (c_parser_postfix_expression) : Adjust call to fold_offsetof. * c-typeck.c (build_unary_op) : Call fold_offsetof_1. c-family/ * c-common.c (c_fully_fold_internal) : Call fold_offsetof_1. (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust. : Return the argument. : Remove special code for negative offset. Call fold_build_pointer_plus instead of size_binop. (fold_offsetof): Remove STOP_REF argument and adjust. * c-common.h (fold_offsetof_1): Declare. (fold_offsetof): Remove STOP_REF argument. cp/ * semantics.c (finish_offsetof): Adjust call to fold_offsetof. * typeck.c (cp_build_addr_expr_1): Call fold_offsetof_1. Added: trunk/gcc/testsuite/g++.dg/other/offsetof7.C Modified: trunk/gcc/ChangeLog trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-common.c trunk/gcc/c-family/c-common.h trunk/gcc/c-parser.c trunk/gcc/c-typeck.c trunk/gcc/cp/ChangeLog trunk/gcc/cp/semantics.c trunk/gcc/cp/typeck.c trunk/gcc/testsuite/ChangeLog
[Bug c++/50608] [4.6/4.7 regression] cannot apply 'offsetof' to a non-constant address
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50608 Jakub Jelinek changed: What|Removed |Added Target Milestone|4.6.2 |4.6.3 --- Comment #5 from Jakub Jelinek 2011-10-26 17:13:25 UTC --- GCC 4.6.2 is being released.
[Bug c++/50608] [4.6/4.7 Regression] cannot apply 'offsetof' to a non constant address
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50608 Eric Botcazou changed: What|Removed |Added Status|NEW |ASSIGNED AssignedTo|unassigned at gcc dot |ebotcazou at gcc dot |gnu.org |gnu.org --- Comment #4 from Eric Botcazou 2011-10-11 09:48:05 UTC --- It turns out that __builtin_offsetof goes through the new code. Fixing...
[Bug c++/50608] [4.6/4.7 Regression] cannot apply 'offsetof' to a non constant address
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50608 Mikael Pettersson changed: What|Removed |Added CC||ebotcazou at gcc dot ||gnu.org, mikpe at it dot ||uu.se --- Comment #3 from Mikael Pettersson 2011-10-11 09:07:53 UTC --- This regression started with r159800, Eric Botcazou's PR44100 fix: http://gcc.gnu.org/ml/gcc-cvs/2010-05/msg00854.html
[Bug c++/50608] [4.6/4.7 Regression] cannot apply 'offsetof' to a non constant address
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50608 Richard Guenther changed: What|Removed |Added Keywords||rejects-valid Priority|P3 |P2 Known to work||4.5.3 Known to fail||4.6.0
[Bug c++/50608] [4.6/4.7 Regression] cannot apply 'offsetof' to a non constant address
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50608 Richard Guenther changed: What|Removed |Added Target Milestone|--- |4.6.2
[Bug c++/50608] [4.6/4.7 Regression] cannot apply 'offsetof' to a non constant address
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50608 Paolo Carlini changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2011-10-04 Summary|cannot apply 'offsetof' to |[4.6/4.7 Regression] cannot |a non constant address |apply 'offsetof' to a non ||constant address Ever Confirmed|0 |1 --- Comment #2 from Paolo Carlini 2011-10-04 09:34:37 UTC --- Seems a Regression.