Fix PR debug/60655 - part 1
authorramana <ramana@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 4 Apr 2014 16:10:07 +0000 (16:10 +0000)
committerramana <ramana@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 4 Apr 2014 16:10:07 +0000 (16:10 +0000)
commit8a65c6637211061c5e99a076228daf6761b8df76
tree50c846818a329a7e2c5f0920aabec1efa7b38dd7
parent68063ed27e0eac92d99b5905df7a74fd189a67ae
Fix PR debug/60655 - part 1

This is a partial fix for PR60655 where dwarf2out.c rejects NOT of a
value in const_ok_for_output_1. There is still a problem with the
testcase on armhf where we get operations of the form, const (minus
(const_int) (symref)) without the -fdata-sections option which is just
weird. I'm not yet sure where this is produced from and will not have
the time to dig further today.

As Jakub said on IRC, const_ok_for_output_1 is called only with
partial rtx's and therefore disabling minus (const_int) (symref) might
not be the best thing to do especially if this were part of plus
(symref) (minus (const int) (symref)) and both symrefs were in the
same section.

Bootstrapped and regtested on armhf

Bootstrap and regression test running on x86_64.

Ok to commit ?

regards
Ramana

gcc/

<DATE>   Jakub Jelinek <jakub@redhat.com>
         Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

* dwarf2out.c (const_ok_for_output_1): Reject expressions
containing a NOT.

gcc/testsuite

<DATE>  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

* gcc.c-torture/compile/pr60655-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209121 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr60655-1.c [new file with mode: 0644]