------- Additional Comments From ebotcazou at gcc dot gnu dot org 2005-02-24 15:59 ------- > New test case exhibits same problem.
Confirmed. Reduced testcase: struct demo { int s; }; extern struct demo * const *xd; static inline struct demo *fn1(void) __attribute__((pure)); static inline struct demo *fn1(void) { struct demo **d; return *xd; } unsigned long foo() { unsigned long old = 0; fn1()->s -= 1; return old; } The code is correct with an explicit decrement operator. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17972