diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-14 15:24:58 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-14 15:24:58 +0000 |
commit | 416665476f1a049bedd9701cd45ca2d1092a4089 (patch) | |
tree | 6bc98c2b971bacd64ab72231944ae7638b59a7f8 | |
parent | 1d84a51ce43cf9358213b9be6290cf8da8485276 (diff) | |
download | gcc-416665476f1a049bedd9701cd45ca2d1092a4089.tar.gz |
* var-tracking.c (add_stores): Fix oversight in latest commit.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205986 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr59350.c | 82 | ||||
-rw-r--r-- | gcc/var-tracking.c | 1 |
4 files changed, 91 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cd64b59bf08..3acc708de91 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2013-12-14 Eric Botcazou <ebotcazou@adacore.com> + + * gcc.dg/pr59350.c: New test. + 2013-12-14 Marek Polacek <polacek@redhat.com> PR sanitizer/59503 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 09d2291179e..a53133b3e6b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2013-12-14 Eric Botcazou <ebotcazou@adacore.com> + + * var-tracking.c (add_stores): Fix oversight in latest commit. + 2013-12-14 Marek Polacek <polacek@redhat.com> * c-c++-common/ubsan/overflow-1.c: New test. diff --git a/gcc/testsuite/gcc.dg/pr59350.c b/gcc/testsuite/gcc.dg/pr59350.c new file mode 100644 index 00000000000..be186873ac5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr59350.c @@ -0,0 +1,82 @@ +/* PR rtl-optimization/59350 */ +/* Testcase by Ryan Mansfield <rmansfield@qnx.com> */ + +/* { dg-do compile } */ +/* { dg-options "-O -g" } */ + +typedef union +{ + char b[2]; + short NotAnInteger; +} +mDNSOpaque16; +typedef mDNSOpaque16 mDNSIPPort; +typedef struct +{ +} +mDNSAddr; +typedef struct DNSQuestion_struct DNSQuestion; +typedef struct mDNS_struct mDNS; +typedef struct __attribute__ ((__packed__)) +{ + mDNSOpaque16 id; + mDNSOpaque16 flags; +} + +DNSMessageHeader; +typedef struct __attribute__ ((__packed__)) +{ + DNSMessageHeader h; +} + +DNSMessage; +struct DNSQuestion_struct +{ + DNSQuestion *next; + long LastQTime; + mDNSOpaque16 TargetQID; +}; +struct mDNS_struct +{ + long timenow; + DNSQuestion *Questions; +}; +extern long mDNSPlatformOneSecond; +typedef enum +{ + kDNSFlag0_QR_Mask = 0x80, kDNSFlag0_QR_Query = 0x00, kDNSFlag0_QR_Response = + 0x80, kDNSFlag0_OP_Mask = 0x78, kDNSFlag0_OP_StdQuery = + 0x00, kDNSFlag0_OP_Iquery = 0x08, kDNSFlag0_OP_Status = + 0x10, kDNSFlag0_OP_Unused3 = 0x18, kDNSFlag0_OP_Notify = + 0x20, kDNSFlag0_OP_Update = 0x28, kDNSFlag0_QROP_Mask = + kDNSFlag0_QR_Mask | kDNSFlag0_OP_Mask, kDNSFlag0_AA = 0x04, kDNSFlag0_TC = + 0x02, kDNSFlag0_RD = 0x01, kDNSFlag1_RA = 0x80, kDNSFlag1_Zero = + 0x40, kDNSFlag1_AD = 0x20, kDNSFlag1_CD = 0x10, kDNSFlag1_RC_Mask = + 0x0F, kDNSFlag1_RC_NoErr = 0x00, kDNSFlag1_RC_FormErr = + 0x01, kDNSFlag1_RC_ServFail = 0x02, kDNSFlag1_RC_NXDomain = + 0x03, kDNSFlag1_RC_NotImpl = 0x04, kDNSFlag1_RC_Refused = + 0x05, kDNSFlag1_RC_YXDomain = 0x06, kDNSFlag1_RC_YXRRSet = + 0x07, kDNSFlag1_RC_NXRRSet = 0x08, kDNSFlag1_RC_NotAuth = + 0x09, kDNSFlag1_RC_NotZone = 0x0A +} +TSIG_ErrorCode; +void +uDNS_ReceiveMsg (mDNS * const m, DNSMessage * const msg, + const char * const end, const mDNSAddr * const srcaddr, + const mDNSIPPort srcport) +{ + DNSQuestion *qptr; + char StdR = kDNSFlag0_QR_Response | kDNSFlag0_OP_StdQuery; + char QR_OP = (char) (msg->h.flags.b[0] & kDNSFlag0_QROP_Mask); + if (QR_OP == StdR) + { + if (uDNS_ReceiveTestQuestionResponse (m, msg, end, srcaddr, srcport)) + return; + for (qptr = m->Questions; qptr; qptr = qptr->next) + if (msg->h.flags.b[0] & kDNSFlag0_TC + && ((qptr->TargetQID).NotAnInteger == (msg->h.id).NotAnInteger) + && m->timenow - qptr->LastQTime < (60 * mDNSPlatformOneSecond)) + { + } + } +} diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index f38cbe15bbc..8eb86bf4feb 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -5938,6 +5938,7 @@ add_stores (rtx loc, const_rtx expr, void *cuip) && REG_EXPR (loc) && TREE_CODE (REG_EXPR (loc)) == PARM_DECL && DECL_MODE (REG_EXPR (loc)) != BLKmode + && TREE_CODE (TREE_TYPE (REG_EXPR (loc))) != UNION_TYPE && ((MEM_P (DECL_INCOMING_RTL (REG_EXPR (loc))) && XEXP (DECL_INCOMING_RTL (REG_EXPR (loc)), 0) != arg_pointer_rtx) || (GET_CODE (DECL_INCOMING_RTL (REG_EXPR (loc))) == PARALLEL |