diff options
| author | zlaski <zlaski@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-12-10 21:08:22 +0000 |
|---|---|---|
| committer | zlaski <zlaski@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-12-10 21:08:22 +0000 |
| commit | 4bb2a91a8bddacdd6adc38b8f7313f07603627e6 (patch) | |
| tree | 85e04f0194bb4106dcf0815a403023b1edcf923d /gcc/c-typeck.c | |
| parent | 0e9a0f69b78e251229bd4b3afdb92eeb64fe43e1 (diff) | |
| download | ppe42-gcc-4bb2a91a8bddacdd6adc38b8f7313f07603627e6.tar.gz ppe42-gcc-4bb2a91a8bddacdd6adc38b8f7313f07603627e6.zip | |
[gcc/ChangeLog]
2004-12-10 Ziemowit Laski <zlaski@apple.com>
* c-typeck.c (lookup_field): Check if a TYPE_LANG_SPECIFIC
pointer field is set before dereferencing it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92007 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-typeck.c')
| -rw-r--r-- | gcc/c-typeck.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index e5c8ef5234e..b3f18727585 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -1377,7 +1377,7 @@ lookup_field (tree decl, tree component) find the element. Otherwise, do a linear search. TYPE_LANG_SPECIFIC will always be set for structures which have many elements. */ - if (TYPE_LANG_SPECIFIC (type)) + if (TYPE_LANG_SPECIFIC (type) && TYPE_LANG_SPECIFIC (type)->s) { int bot, top, half; tree *field_array = &TYPE_LANG_SPECIFIC (type)->s->elts[0]; |

