Mercurial > hg > CbC > CbC_gcc
comparison gcc/tsan.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* GCC instrumentation plugin for ThreadSanitizer. | 1 /* GCC instrumentation plugin for ThreadSanitizer. |
2 Copyright (C) 2011-2017 Free Software Foundation, Inc. | 2 Copyright (C) 2011-2018 Free Software Foundation, Inc. |
3 Contributed by Dmitry Vyukov <dvyukov@google.com> | 3 Contributed by Dmitry Vyukov <dvyukov@google.com> |
4 | 4 |
5 This file is part of GCC. | 5 This file is part of GCC. |
6 | 6 |
7 GCC is free software; you can redistribute it and/or modify it under | 7 GCC is free software; you can redistribute it and/or modify it under |
108 | 108 |
109 size = int_size_in_bytes (TREE_TYPE (expr)); | 109 size = int_size_in_bytes (TREE_TYPE (expr)); |
110 if (size <= 0) | 110 if (size <= 0) |
111 return false; | 111 return false; |
112 | 112 |
113 HOST_WIDE_INT bitsize, bitpos; | 113 poly_int64 unused_bitsize, unused_bitpos; |
114 tree offset; | 114 tree offset; |
115 machine_mode mode; | 115 machine_mode mode; |
116 int unsignedp, reversep, volatilep = 0; | 116 int unsignedp, reversep, volatilep = 0; |
117 base = get_inner_reference (expr, &bitsize, &bitpos, &offset, &mode, | 117 base = get_inner_reference (expr, &unused_bitsize, &unused_bitpos, &offset, |
118 &unsignedp, &reversep, &volatilep); | 118 &mode, &unsignedp, &reversep, &volatilep); |
119 | 119 |
120 /* No need to instrument accesses to decls that don't escape, | 120 /* No need to instrument accesses to decls that don't escape, |
121 they can't escape to other threads then. */ | 121 they can't escape to other threads then. */ |
122 if (DECL_P (base) && !is_global_var (base)) | 122 if (DECL_P (base) && !is_global_var (base)) |
123 { | 123 { |
140 | 140 |
141 if ((TREE_CODE (expr) == COMPONENT_REF | 141 if ((TREE_CODE (expr) == COMPONENT_REF |
142 && DECL_BIT_FIELD_TYPE (TREE_OPERAND (expr, 1))) | 142 && DECL_BIT_FIELD_TYPE (TREE_OPERAND (expr, 1))) |
143 || TREE_CODE (expr) == BIT_FIELD_REF) | 143 || TREE_CODE (expr) == BIT_FIELD_REF) |
144 { | 144 { |
145 HOST_WIDE_INT bitpos, bitsize; | |
145 base = TREE_OPERAND (expr, 0); | 146 base = TREE_OPERAND (expr, 0); |
146 if (TREE_CODE (expr) == COMPONENT_REF) | 147 if (TREE_CODE (expr) == COMPONENT_REF) |
147 { | 148 { |
148 expr = TREE_OPERAND (expr, 1); | 149 expr = TREE_OPERAND (expr, 1); |
149 if (is_write && DECL_BIT_FIELD_REPRESENTATIVE (expr)) | 150 if (is_write && DECL_BIT_FIELD_REPRESENTATIVE (expr)) |