[Bug middle-end/29478] [4.2 Regression] optmization generates warning for casts

2007-07-26 Thread rguenth at gcc dot gnu dot org


--- Comment #17 from rguenth at gcc dot gnu dot org  2007-07-26 15:02 
---
Unassigning.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|rguenth at gcc dot gnu dot  |unassigned at gcc dot gnu
   |org |dot org
 Status|ASSIGNED|NEW


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478



[Bug middle-end/29478] [4.2 Regression] optmization generates warning for casts

2007-07-22 Thread pinskia at gcc dot gnu dot org


--- Comment #16 from pinskia at gcc dot gnu dot org  2007-07-22 19:31 
---
*** Bug 32854 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||ch at dot-heine dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478



[Bug middle-end/29478] [4.2 Regression] optmization generates warning for casts

2007-07-19 Thread mmitchel at gcc dot gnu dot org


-- 

mmitchel at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|4.2.1   |4.2.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478



[Bug middle-end/29478] [4.2 Regression] optmization generates warning for casts

2007-06-23 Thread rguenth at gcc dot gnu dot org


--- Comment #15 from rguenth at gcc dot gnu dot org  2007-06-23 18:18 
---
Fixed on the mainline.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

  Known to work|4.1.1 4.1.2 |4.1.1 4.1.2 4.3.0
Summary|[4.2/4.3 Regression]|[4.2 Regression] optmization
   |optmization generates   |generates warning for casts
   |warning for casts   |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478



[Bug middle-end/29478] [4.2 Regression] optmization generates warning for casts

2006-10-23 Thread amylaar at gcc dot gnu dot org


--- Comment #7 from amylaar at gcc dot gnu dot org  2006-10-23 17:30 ---
(In reply to comment #6)
 A regression hunt identified the following patch:
 
 http://gcc.gnu.org/viewcvs?view=revrev=116424
 
 r116424 | amylaar | 2006-08-25 18:51:57 + (Fri, 25 Aug 2006)
 

When I modify the testcase to have the function defintion after the use:

struct block;

static int remove_out_of_scope_renamings ();

int
ada_lookup_symbol_list (const struct block *block0)
{
  return remove_out_of_scope_renamings ((struct block *) block0);
}

static int
remove_out_of_scope_renamings (current_block)
  struct block *current_block;
{
  return 1;
}

I still see that the cast has been stripped at the point where
c_convert_parm_for_inlining is called:

(gdb) call debug_tree(value)
 parm_decl 0xb593c000 block0
type pointer_type 0xb59315c0
type record_type 0xb5931564 block readonly VOID
...

OTOH, if I further change the passed parameter to a plain 0, value contains an
unadorned integer constant.   

(gdb) call debug_tree(value)
 integer_cst 0xb58aa978 type integer_type 0xb58bb284 int constant invariant
0

I think it is wrong that we are optimizing the expression before converting
it to the required type.
Moreover, why is it right to drop NOP_EXPRESSIONS there?  If for some reason
the compiler finds it needs to put the initializer in a temporary variable,
and uses the type of the value for that variable, we'll get an alias set
problem.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478



[Bug middle-end/29478] [4.2 Regression] optmization generates warning for casts

2006-10-23 Thread pinskia at gmail dot com


--- Comment #8 from pinskia at gmail dot com  2006-10-23 21:37 ---
Subject: Re:  [4.2 Regression] optmization generates warning for casts

On 23 Oct 2006 17:30:22 -, amylaar at gcc dot gnu dot org
[EMAIL PROTECTED] wrote:
 I think it is wrong that we are optimizing the expression before converting
 it to the required type.
 Moreover, why is it right to drop NOP_EXPRESSIONS there?  If for some reason
 the compiler finds it needs to put the initializer in a temporary variable,
 and uses the type of the value for that variable, we'll get an alias set
 problem.

Hmm, This is one of the language hooks which really need to go away
for LTO as I understand it.  Also I the real problem comes from the
inliner or the gimplifier (I am betting the gimplifier) removing the
cast as it is useless in our type system.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478



[Bug middle-end/29478] [4.2 Regression] optmization generates warning for casts

2006-10-16 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2006-10-16 13:37 ---
Happens during inlining, so I guess one of the strip-useless-type-conversion
patches caused this.

But initialize_inlined_parameters shouldn't call into the frontend again here:

  /* Find the initializer.  */
  value = lang_hooks.tree_inlining.convert_parm_for_inlining
  (p, a ? TREE_VALUE (a) : NULL_TREE, fn, argnum);

I don't see why this should be necessary anymore as we're now inlining gimple?


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu dot
   ||org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478



[Bug middle-end/29478] [4.2 Regression] optmization generates warning for casts

2006-10-16 Thread rguenth at gcc dot gnu dot org


--- Comment #4 from rguenth at gcc dot gnu dot org  2006-10-16 13:46 ---
I'm testing complete removal of the langhook.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478



[Bug middle-end/29478] [4.2 Regression] optmization generates warning for casts

2006-10-16 Thread rguenth at gcc dot gnu dot org


--- Comment #5 from rguenth at gcc dot gnu dot org  2006-10-16 16:06 ---
Doesn't work out.  It looks like we depend on its side-effects in some
testcases:

FAIL: gcc.dg/assign-warn-3.c  (test for warnings, line 9)
FAIL: gcc.dg/assign-warn-3.c  (test for warnings, line 13)
FAIL: gcc.dg/pr29254.c  (test for warnings, line )
FAIL: gcc.dg/pr29254.c  (test for warnings, line 21)
FAIL: gcc.dg/warn-1.c  (test for warnings, line 15)
FAIL: gcc.dg/noncompile/pr16876.c (internal compiler error)
FAIL: gcc.dg/noncompile/pr16876.c  (test for errors, line 10)
...

pr29254 is artificial - it tests for the bogus warning, otherwise the warning
should be done in the frontend.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478



[Bug middle-end/29478] [4.2 Regression] optmization generates warning for casts

2006-10-16 Thread janis at gcc dot gnu dot org


--- Comment #6 from janis at gcc dot gnu dot org  2006-10-16 19:21 ---
A regression hunt identified the following patch:

http://gcc.gnu.org/viewcvs?view=revrev=116424

r116424 | amylaar | 2006-08-25 18:51:57 + (Fri, 25 Aug 2006)


-- 

janis at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||amylaar at gcc dot gnu dot
   ||org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478



[Bug middle-end/29478] [4.2 Regression] optmization generates warning for casts

2006-10-15 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2006-10-15 15:41 ---
Janis,
  Could you do a regression hunt on this bug?

Thanks,
Andrew


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||janis at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478



[Bug middle-end/29478] [4.2 Regression] optmization generates warning for casts

2006-10-15 Thread mmitchel at gcc dot gnu dot org


-- 

mmitchel at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478