[Bug target/77326] [avr] Invalid optimization using varargs and a weak function

2016-09-21 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77326

--- Comment #4 from Georg-Johann Lay  ---
Author: gjl
Date: Wed Sep 21 14:11:59 2016
New Revision: 240315

URL: https://gcc.gnu.org/viewcvs?rev=240315=gcc=rev
Log:
gcc/
Backport from 2016-09-21 trunk r240306.
PR target/77326
* config/avr/avr.c (hard-reg-set.h): Move #include up in front
of rtl.h to that HARD_CONST is defined in rtl.h.
(avr_notice_update_cc) [CC_NONE]: If insn touches some regs
mentioned in cc_status, do CC_STATUS_INIT.

gcc/testsuite/
Backport from 2016-09-21 trunk r240306.
PR target/77326
* gcc.target/avr/torture/pr77326.c: New test.


Added:
branches/gcc-5-branch/gcc/testsuite/gcc.target/avr/torture/pr77326.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/config/avr/avr.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug target/77326] [avr] Invalid optimization using varargs and a weak function

2016-09-21 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77326

--- Comment #3 from Georg-Johann Lay  ---
Author: gjl
Date: Wed Sep 21 09:31:38 2016
New Revision: 240308

URL: https://gcc.gnu.org/viewcvs?rev=240308=gcc=rev
Log:
Backport from 2016-09-21 trunk r240306.
PR target/77326
* config/avr/avr.c (avr_notice_update_cc) [CC_NONE]: If insn
touches some regs mentioned in cc_status, do CC_STATUS_INIT.


Added:
branches/gcc-6-branch/gcc/testsuite/gcc.target/avr/torture/pr77326.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/config/avr/avr.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug target/77326] [avr] Invalid optimization using varargs and a weak function

2016-09-21 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77326

--- Comment #2 from Georg-Johann Lay  ---
Author: gjl
Date: Wed Sep 21 09:17:32 2016
New Revision: 240306

URL: https://gcc.gnu.org/viewcvs?rev=240306=gcc=rev
Log:
gcc/
PR target/77326
* config/avr/avr.c (avr_notice_update_cc) [CC_NONE]: If insn
touches some regs mentioned in cc_status, do CC_STATUS_INIT.
gcc/testsuite/
PR target/77326
* gcc.target/avr/torture/pr77326.c: New test.


Added:
trunk/gcc/testsuite/gcc.target/avr/torture/pr77326.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.c
trunk/gcc/testsuite/ChangeLog

[Bug target/77326] [avr] Invalid optimization using varargs and a weak function

2016-08-22 Thread matthijs at stdin dot nl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77326

--- Comment #1 from Matthijs Kooijman  ---
The original reporter just added a comment that this does not occur anymore in
gcc 6.1.0, though I haven't got anything newer than 5.1 available here to
check.