public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/47140] New: error: conversion of register to a different size
@ 2011-01-01 1:36 regehr at cs dot utah.edu
2011-01-01 14:33 ` [Bug tree-optimization/47140] [4.6 Regression] " jakub at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: regehr at cs dot utah.edu @ 2011-01-01 1:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47140
Summary: error: conversion of register to a different size
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: regehr@cs.utah.edu
CC: chenyang@cs.utah.edu
There are several verify_stmts failed problems pending, but this one looks
different. Apologies if it's a dup.
[regehr@gamow tmp434]$ current-gcc -c -O2 small.c
small.c: In function 'uint321':
small.c:33:5: error: conversion of register to a different size
VIEW_CONVERT_EXPR<int>(D.2762_32);
pretmp.6_33 = VIEW_CONVERT_EXPR<int>(D.2762_32);
small.c:33:5: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
[regehr@gamow tmp434]$ current-gcc -v
Using built-in specs.
COLLECT_GCC=current-gcc
COLLECT_LTO_WRAPPER=/uusoc/exports/scratch/regehr/z/compiler-install/gcc-r168380-install/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --with-libelf=/usr/local --enable-lto
--prefix=/home/regehr/z/compiler-install/gcc-r168380-install
--program-prefix=r168380- --enable-languages=c,c++
Thread model: posix
gcc version 4.6.0 20101231 (experimental) (GCC)
[regehr@gamow tmp434]$ cat small.c
typedef short int int16_t;
typedef int int32_t;
typedef unsigned char uint8_t;
typedef unsigned short int uint16_t;
static int32_t
safe_mod_func_int32_t_s_s (int32_t si1, int16_t si2)
{
return si2 == 0 || si1 == -2147483647 - 1 && si2 ? si1 : si1 + si2;
}
static uint8_t
safe_add_func_uint8_t_u_u (uint8_t ui1, uint8_t ui2)
{
return ui1 + ui2;
}
static uint16_t
safe_sub_func_uint16_t_u_u (uint16_t ui1, uint8_t ui2)
{
return ui1 - ui2;
}
int16_t g_32;
int16_t g_76[7][10] = {
};
volatile int32_t g_98[1][1] = {
};
volatile int32_t *g_97 = &g_98[0][0];
int uint321 (void)
{
for (0;; 1)
*g_97 =
safe_mod_func_int32_t_s_s (safe_add_func_uint8_t_u_u
(1,
func_21 (g_32,
g_76[5][5])) >=
safe_sub_func_uint16_t_u_u (&g_97 == 0, 1),
0);
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/47140] [4.6 Regression] error: conversion of register to a different size
2011-01-01 1:36 [Bug c/47140] New: error: conversion of register to a different size regehr at cs dot utah.edu
@ 2011-01-01 14:33 ` jakub at gcc dot gnu.org
2011-01-01 15:26 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-01 14:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47140
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Known to work| |4.5.2
Keywords| |ice-on-valid-code
Last reconfirmed| |2011.01.01 14:33:23
CC| |jakub at gcc dot gnu.org,
| |rguenth at gcc dot gnu.org
Ever Confirmed|0 |1
Summary|error: conversion of |[4.6 Regression] error:
|register to a different |conversion of register to a
|size |different size
Target Milestone|--- |4.6.0
Known to fail| |4.6.0
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-01 14:33:23 UTC ---
Caused by http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162943
Smaller testcase:
static int
foo (int x, short y)
{
return y == 0 ? x : x + y;
}
static unsigned short
bar (unsigned short x, unsigned char y)
{
return x - y;
}
int w;
int baz (void);
int
test (void)
{
for (;;)
w = foo ((unsigned char) (1 + baz ()) >= bar (0, 1), 0);
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/47140] [4.6 Regression] error: conversion of register to a different size
2011-01-01 1:36 [Bug c/47140] New: error: conversion of register to a different size regehr at cs dot utah.edu
2011-01-01 14:33 ` [Bug tree-optimization/47140] [4.6 Regression] " jakub at gcc dot gnu.org
@ 2011-01-01 15:26 ` jakub at gcc dot gnu.org
2011-01-02 17:09 ` jakub at gcc dot gnu.org
2011-01-02 17:24 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-01 15:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47140
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-01 15:26:01 UTC ---
Created attachment 22877
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22877
gcc46-pr47140.patch
Untested fix.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/47140] [4.6 Regression] error: conversion of register to a different size
2011-01-01 1:36 [Bug c/47140] New: error: conversion of register to a different size regehr at cs dot utah.edu
2011-01-01 14:33 ` [Bug tree-optimization/47140] [4.6 Regression] " jakub at gcc dot gnu.org
2011-01-01 15:26 ` jakub at gcc dot gnu.org
@ 2011-01-02 17:09 ` jakub at gcc dot gnu.org
2011-01-02 17:24 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-02 17:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47140
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-02 17:09:11 UTC ---
Author: jakub
Date: Sun Jan 2 17:09:08 2011
New Revision: 168402
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168402
Log:
PR tree-optimization/47140
* tree-ssa-ccp.c (evaluate_stmt): For binary assignments, use
TREE_TYPE (lhs) instead of TREE_TYPE (rhs1) as second argument
to bit_value_binop.
* gcc.c-torture/compile/pr47140.c: New test.
Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr47140.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-ccp.c
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/47140] [4.6 Regression] error: conversion of register to a different size
2011-01-01 1:36 [Bug c/47140] New: error: conversion of register to a different size regehr at cs dot utah.edu
` (2 preceding siblings ...)
2011-01-02 17:09 ` jakub at gcc dot gnu.org
@ 2011-01-02 17:24 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-02 17:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47140
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-02 17:24:32 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-01-02 17:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-01 1:36 [Bug c/47140] New: error: conversion of register to a different size regehr at cs dot utah.edu
2011-01-01 14:33 ` [Bug tree-optimization/47140] [4.6 Regression] " jakub at gcc dot gnu.org
2011-01-01 15:26 ` jakub at gcc dot gnu.org
2011-01-02 17:09 ` jakub at gcc dot gnu.org
2011-01-02 17:24 ` jakub at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).