re PR c++/37217 (-Wconversion causes ICE with __builtin_strcmp with one char compare)
2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR 37217 * c-common.c (conversion_warning): Check for null operands. testsuite/ * gcc.dg/pr37217.c: New. From-SVN: r139682
This commit is contained in:
parent
e9527cfd96
commit
1bfb8f513f
4 changed files with 21 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
|
||||
|
||||
PR 37217
|
||||
* c-common.c (convesion_warning): Check for null operands.
|
||||
|
||||
2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
|
||||
|
||||
PR c/31673
|
||||
|
|
|
@ -1568,7 +1568,7 @@ conversion_warning (tree type, tree expr)
|
|||
for (i = 0; i < expr_num_operands; i++)
|
||||
{
|
||||
tree op = TREE_OPERAND (expr, i);
|
||||
if (DECL_P (op) && DECL_ARTIFICIAL (op))
|
||||
if (op && DECL_P (op) && DECL_ARTIFICIAL (op))
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
|
||||
|
||||
PR 37217
|
||||
* gcc.dg/pr37217.c: New.
|
||||
|
||||
2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
|
||||
|
||||
PR c/31673
|
||||
|
|
10
gcc/testsuite/gcc.dg/pr37217.c
Normal file
10
gcc/testsuite/gcc.dg/pr37217.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
/* PR 37217 ICE with -Wconversion */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-Wconversion" } */
|
||||
typedef struct Tcl_ResolvedVarInfo {
|
||||
char *re_guts;
|
||||
} regex_t;
|
||||
void TclReComp(regex_t *re)
|
||||
{
|
||||
if (re->re_guts == ((void *)0)) ;
|
||||
}
|
Loading…
Add table
Reference in a new issue