public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/26004]  New: gcc errors on valid code
@ 2006-01-28 13:06 gcc-bugzilla at gcc dot gnu dot org
  2006-01-28 15:17 ` [Bug c/26004] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2006-01-28 13:06 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1331 bytes --]



Gcc complains about legal code.  Test case stripped down from a gdb
testsuite test case.

Environment:
System: Linux fishfood.ninemoons.com 2.6.14-1.1656_FC4 #1 Thu Jan 5 22:13:22
EST 2006 i686 i686 i386 GNU/Linux
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /src/latest/trunk/src/gcc/configure -v
--prefix=/opt/local/latest/trunk --enable-languages=c,c++
--cache-file=.././config.cache --srcdir=/src/latest/trunk/src/gcc

How-To-Repeat:

$ cat /tmp/bug.c
struct s_1 { short s[1]; } z_1;

struct s_1
add_struct_1 (struct s_1 s)
{
  return s;
}

struct s_1
wack_struct_1 (void)
{
  register struct s_1 u = z_1;
  u = add_struct_1 (u);
  return u;
}

$ gcc -c /tmp/bug.c
/tmp/bug.c: In function ‘wack_struct_1’:
/tmp/bug.c:13: error: address of register variable ‘u’ requested


-- 
           Summary: gcc errors on valid code
           Product: gcc
           Version: 2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fnf at specifix dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
@ 2006-01-28 15:17 ` pinskia at gcc dot gnu dot org
  2006-01-30 17:42 ` amylaar at gcc dot gnu dot org
                   ` (21 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-28 15:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-01-28 15:17 -------
Confirmed, a regression from at least 4.0.2.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
  GCC build triplet|i686-pc-linux-gnu           |
   GCC host triplet|i686-pc-linux-gnu           |
 GCC target triplet|i686-pc-linux-gnu           |
           Keywords|                            |rejects-valid
      Known to fail|                            |4.1.0 4.2.0
      Known to work|                            |4.0.2
   Last reconfirmed|0000-00-00 00:00:00         |2006-01-28 15:17:42
               date|                            |
            Summary|gcc errors on valid code    |[4.1/4.2 Regression] gcc
                   |                            |errors on valid code
   Target Milestone|---                         |4.1.0
            Version|2.0                         |4.2.0


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
  2006-01-28 15:17 ` [Bug c/26004] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-01-30 17:42 ` amylaar at gcc dot gnu dot org
  2006-01-30 18:01 ` [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO] pinskia at gcc dot gnu dot org
                   ` (20 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-01-30 17:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from amylaar at gcc dot gnu dot org  2006-01-30 17:42 -------
Strange - both on mainline and the 4.1 branch, I can reproduce this (albeit
with
a more sensible variable name of "u") for i686-pc-linux-gnu native, but not for
a cross to sh-elf.  Yet the failing mark_addressable call is done for i686 from
the gimplifier.


-- 


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
  2006-01-28 15:17 ` [Bug c/26004] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
  2006-01-30 17:42 ` amylaar at gcc dot gnu dot org
@ 2006-01-30 18:01 ` pinskia at gcc dot gnu dot org
  2006-01-30 18:29 ` amylaar at gcc dot gnu dot org
                   ` (19 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-30 18:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-01-30 18:01 -------
This is caused by the following code in gimplifier:
3297                if (use_target)
3298                  {
3299                    CALL_EXPR_RETURN_SLOT_OPT (*from_p) = 1;
3300                    lang_hooks.mark_addressable (*to_p);
3301                  }


Should we really be calling lang_hooks.mark_addressable, here?


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu dot org
            Summary|[4.1/4.2 Regression] gcc    |[4.1/4.2 Regression] gcc
                   |errors on valid code        |errors on valid code [SVO]


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-01-30 18:01 ` [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO] pinskia at gcc dot gnu dot org
@ 2006-01-30 18:29 ` amylaar at gcc dot gnu dot org
  2006-01-30 18:32 ` amylaar at gcc dot gnu dot org
                   ` (18 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-01-30 18:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from amylaar at gcc dot gnu dot org  2006-01-30 18:29 -------
(In reply to comment #3)
> This is caused by the following code in gimplifier:
> 3297                if (use_target)
> 3298                  {
> 3299                    CALL_EXPR_RETURN_SLOT_OPT (*from_p) = 1;
> 3300                    lang_hooks.mark_addressable (*to_p);
> 3301                  }
> 
> 
> Should we really be calling lang_hooks.mark_addressable, here?
> 

I think the problem is actually not testing properly if the value is a
register variable first.

A few lines before in gimplify.c:gimplify_modify_expr_rhs, we have:

            else if (is_gimple_reg_type (TREE_TYPE (*to_p)))
              /* Also don't force regs into memory.  */
              use_target = false;

However, is_gimple_reg_type merely looks if the type is an aggregate.
The test that c-typeck.c:c_mark_addressable uses tests C_DECL_REGISTER .

It appears we actually don't have any way to query from the
frontend-indenpendent code if we can mark something as
safely.


-- 


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-01-30 18:29 ` amylaar at gcc dot gnu dot org
@ 2006-01-30 18:32 ` amylaar at gcc dot gnu dot org
  2006-01-30 18:38 ` amylaar at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-01-30 18:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from amylaar at gcc dot gnu dot org  2006-01-30 18:31 -------
> It appears we actually don't have any way to query from the
> frontend-indenpendent code if we can mark something as
> safely.
 ^ addressable


-- 


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-01-30 18:32 ` amylaar at gcc dot gnu dot org
@ 2006-01-30 18:38 ` amylaar at gcc dot gnu dot org
  2006-02-01  3:14 ` mmitchel at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-01-30 18:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from amylaar at gcc dot gnu dot org  2006-01-30 18:38 -------
(In reply to comment #2)
> Strange - both on mainline and the 4.1 branch, I can reproduce this (albeit
> with
> a more sensible variable name of "u") for i686-pc-linux-gnu native, but not for
> a cross to sh-elf.  Yet the failing mark_addressable call is done for i686 from
> the gimplifier.

FWIW, the optimization that malfunctions applies to calls of functions that
return their value in memory.  Because the s_1 type is not returned in memory
on sh-elf, the testcase doesn't trigger there.  For the test to trigger, s_1
has to be an aggregate (to satisfy the gimple test that this is not a register)
which is returned in memory (so that the optimization is relevant), and the
return value must be assigne to a variable that is declared as register. 


-- 


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-01-30 18:38 ` amylaar at gcc dot gnu dot org
@ 2006-02-01  3:14 ` mmitchel at gcc dot gnu dot org
  2006-02-15 21:41 ` amylaar at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-02-01  3:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from mmitchel at gcc dot gnu dot org  2006-02-01 03:14 -------
This is a design bug.  The middle-end should not be calling mark_addressable
hooks in the front ends.  The fix may be to factor the front end
mark_addressable functions into a part that just does the appropriate
marking/recursion for language-dependent tree codes, and a separate part that
enforces semantic constraints.   The former function would be the one available
to the middle end; the latter (which would presumably call the former) would be
used by the front end itself.

This should be a relatively straightforward fix.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-02-01  3:14 ` mmitchel at gcc dot gnu dot org
@ 2006-02-15 21:41 ` amylaar at gcc dot gnu dot org
  2006-02-15 21:47 ` pinskia at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-02-15 21:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from amylaar at gcc dot gnu dot org  2006-02-15 21:41 -------
Created an attachment (id=10857)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10857&action=view)
infrastructure patch - defective

(In reply to comment #7)
> This should be a relatively straightforward fix.

I had a go at this, but ran into a problem.  When an optimizer requests
a variable to be made addressable, I think we need to keep track of this, so
that we don't complain henceforth when the address is taken again, where
addressing the variable once causes further instances of addressing it.

I thought I could reset DECL_REGISTER for this purpose, and accept addressing
if DECL_REGISTER is cleared on entry in c_mark_addressable.

(The C front end uses C_DECL_REGISTER to keep track of a variable being
declared
 register, and DECL_REGISTER more or less means that we intent do use this as a
 register.)

However, this causes a regression on gcc.dg/reg-vol-struct-1.c line 16 - the
DECL_REGISTER flag has already been reset for 'a' on account of it being
volatile.

So it appears that we need another flag to keep track of when a register has
been made addressable on behalf of the optimizers.


-- 


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2006-02-15 21:41 ` amylaar at gcc dot gnu dot org
@ 2006-02-15 21:47 ` pinskia at gcc dot gnu dot org
  2006-02-15 21:48 ` pinskia at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-15 21:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pinskia at gcc dot gnu dot org  2006-02-15 21:47 -------
That patch looks wrong.  There has to be a better way, maybe just rejecting
return slot optimization instead.


-- 


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2006-02-15 21:47 ` pinskia at gcc dot gnu dot org
@ 2006-02-15 21:48 ` pinskia at gcc dot gnu dot org
  2006-02-24  0:31 ` mmitchel at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-15 21:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pinskia at gcc dot gnu dot org  2006-02-15 21:48 -------
I will look into fixing this bug later today when I get home.


-- 


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2006-02-15 21:48 ` pinskia at gcc dot gnu dot org
@ 2006-02-24  0:31 ` mmitchel at gcc dot gnu dot org
  2006-03-07 12:28 ` pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-02-24  0:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from mmitchel at gcc dot gnu dot org  2006-02-24 00:26 -------
This issue will not be resolved in GCC 4.1.0; retargeted at GCC 4.1.1.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.0                       |4.1.1


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2006-02-24  0:31 ` mmitchel at gcc dot gnu dot org
@ 2006-03-07 12:28 ` pinskia at gcc dot gnu dot org
  2006-03-07 19:52 ` [Bug c/26004] [4.1 " pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-07 12:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from pinskia at gcc dot gnu dot org  2006-03-07 12:28 -------
*** Bug 26591 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ramana dot radhakrishnan at
                   |                            |codito dot com


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug c/26004] [4.1 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2006-03-07 12:28 ` pinskia at gcc dot gnu dot org
@ 2006-03-07 19:52 ` pinskia at gcc dot gnu dot org
  2006-03-07 19:55 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-07 19:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from pinskia at gcc dot gnu dot org  2006-03-07 19:52 -------
This is fixed on the mainline how I don't know.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.1.0 4.2.0                 |4.1.0
      Known to work|4.0.2                       |4.0.2 4.2.0
            Summary|[4.1/4.2 Regression] gcc    |[4.1 Regression] gcc errors
                   |errors on valid code [SVO]  |on valid code [SVO]


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug c/26004] [4.1 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2006-03-07 19:52 ` [Bug c/26004] [4.1 " pinskia at gcc dot gnu dot org
@ 2006-03-07 19:55 ` pinskia at gcc dot gnu dot org
  2006-03-07 21:02 ` [Bug c/26004] [4.1/4.2 " pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-07 19:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from pinskia at gcc dot gnu dot org  2006-03-07 19:55 -------
Janis could you figure out which patch fixed this on the mainline if it was
ever broken on the mainline.


-- 

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=26004


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2006-03-07 19:55 ` pinskia at gcc dot gnu dot org
@ 2006-03-07 21:02 ` pinskia at gcc dot gnu dot org
  2006-03-07 21:06 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-07 21:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from pinskia at gcc dot gnu dot org  2006-03-07 21:02 -------
The reduced testcase in this bug is fixed but the full testcase in the gdb
testsuite.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.1.0                       |4.1.0 4.2.0
      Known to work|4.0.2 4.2.0                 |4.0.2
            Summary|[4.1 Regression] gcc errors |[4.1/4.2 Regression] gcc
                   |on valid code [SVO]         |errors on valid code [SVO]


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
                   ` (14 preceding siblings ...)
  2006-03-07 21:02 ` [Bug c/26004] [4.1/4.2 " pinskia at gcc dot gnu dot org
@ 2006-03-07 21:06 ` pinskia at gcc dot gnu dot org
  2006-03-08  1:34 ` janis at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-07 21:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from pinskia at gcc dot gnu dot org  2006-03-07 21:06 -------
New reduced testcase:
struct s_3 { short s[3]; } z_3, s_3;
struct s_3 add_struct_3 (struct s_3 s){}
wack_struct_3 (void)
{
  int i; register struct s_3 u = z_3;
  u = add_struct_3 (u);
}


-- 


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
                   ` (15 preceding siblings ...)
  2006-03-07 21:06 ` pinskia at gcc dot gnu dot org
@ 2006-03-08  1:34 ` janis at gcc dot gnu dot org
  2006-03-09 17:22 ` jason at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: janis at gcc dot gnu dot org @ 2006-03-08  1:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from janis at gcc dot gnu dot org  2006-03-08 01:34 -------
A regression hunt on powerpc-linux using the testcase from comment #16
identified this patch:

http://gcc.gnu.org/viewcvs?view=rev&rev=101269

r101269 | jason | 2005-06-23 14:44:21 +0000 (Thu, 23 Jun 2005)


-- 


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
                   ` (16 preceding siblings ...)
  2006-03-08  1:34 ` janis at gcc dot gnu dot org
@ 2006-03-09 17:22 ` jason at gcc dot gnu dot org
  2006-03-10 22:47 ` jason at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jason at gcc dot gnu dot org @ 2006-03-09 17:22 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-01-28 15:17:42         |2006-03-09 17:22:00
               date|                            |


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
                   ` (17 preceding siblings ...)
  2006-03-09 17:22 ` jason at gcc dot gnu dot org
@ 2006-03-10 22:47 ` jason at gcc dot gnu dot org
  2006-03-10 23:20 ` [Bug middle-end/26004] [4.1 " pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jason at gcc dot gnu dot org @ 2006-03-10 22:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from jason at gcc dot gnu dot org  2006-03-10 22:47 -------
Subject: Bug 26004

Author: jason
Date: Fri Mar 10 22:47:08 2006
New Revision: 111947

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111947
Log:
        PR c/26004
        * gimplify.c (gimplify_modify_expr_rhs): Don't do return slot opt if
        the target was declared 'register'.

Added:
    trunk/gcc/testsuite/gcc.dg/pr26004.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimplify.c


-- 


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug middle-end/26004] [4.1 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
                   ` (18 preceding siblings ...)
  2006-03-10 22:47 ` jason at gcc dot gnu dot org
@ 2006-03-10 23:20 ` pinskia at gcc dot gnu dot org
  2006-03-10 23:42 ` jason at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-10 23:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from pinskia at gcc dot gnu dot org  2006-03-10 23:20 -------
Fixed on the mainline.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |middle-end
      Known to fail|4.1.0 4.2.0                 |4.1.0
      Known to work|4.0.2                       |4.0.2 4.2.0
            Summary|[4.1/4.2 Regression] gcc    |[4.1 Regression] gcc errors
                   |errors on valid code [SVO]  |on valid code [SVO]


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug middle-end/26004] [4.1 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
                   ` (19 preceding siblings ...)
  2006-03-10 23:20 ` [Bug middle-end/26004] [4.1 " pinskia at gcc dot gnu dot org
@ 2006-03-10 23:42 ` jason at gcc dot gnu dot org
  2006-03-11  0:10 ` pinskia at gcc dot gnu dot org
  2006-06-07 15:42 ` pinskia at gcc dot gnu dot org
  22 siblings, 0 replies; 24+ messages in thread
From: jason at gcc dot gnu dot org @ 2006-03-10 23:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #20 from jason at gcc dot gnu dot org  2006-03-10 23:42 -------
Subject: Bug 26004

Author: jason
Date: Fri Mar 10 23:42:48 2006
New Revision: 111952

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111952
Log:
        PR c/26004
        * gimplify.c (gimplify_modify_expr_rhs): Don't do return slot opt if
        the target was declared 'register'.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/pr26004.c
      - copied unchanged from r111947, trunk/gcc/testsuite/gcc.dg/pr26004.c
Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/gimplify.c


-- 


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug middle-end/26004] [4.1 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
                   ` (20 preceding siblings ...)
  2006-03-10 23:42 ` jason at gcc dot gnu dot org
@ 2006-03-11  0:10 ` pinskia at gcc dot gnu dot org
  2006-06-07 15:42 ` pinskia at gcc dot gnu dot org
  22 siblings, 0 replies; 24+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-11  0:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #21 from pinskia at gcc dot gnu dot org  2006-03-11 00:09 -------
Fixed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [Bug middle-end/26004] [4.1 Regression] gcc errors on valid code [SVO]
  2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
                   ` (21 preceding siblings ...)
  2006-03-11  0:10 ` pinskia at gcc dot gnu dot org
@ 2006-06-07 15:42 ` pinskia at gcc dot gnu dot org
  22 siblings, 0 replies; 24+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-07 15:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #22 from pinskia at gcc dot gnu dot org  2006-06-07 15:38 -------
*** Bug 27932 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nathan at gcc dot gnu dot
                   |                            |org


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2006-06-07 15:39 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-28 13:06 [Bug c/26004] New: gcc errors on valid code gcc-bugzilla at gcc dot gnu dot org
2006-01-28 15:17 ` [Bug c/26004] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-01-30 17:42 ` amylaar at gcc dot gnu dot org
2006-01-30 18:01 ` [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO] pinskia at gcc dot gnu dot org
2006-01-30 18:29 ` amylaar at gcc dot gnu dot org
2006-01-30 18:32 ` amylaar at gcc dot gnu dot org
2006-01-30 18:38 ` amylaar at gcc dot gnu dot org
2006-02-01  3:14 ` mmitchel at gcc dot gnu dot org
2006-02-15 21:41 ` amylaar at gcc dot gnu dot org
2006-02-15 21:47 ` pinskia at gcc dot gnu dot org
2006-02-15 21:48 ` pinskia at gcc dot gnu dot org
2006-02-24  0:31 ` mmitchel at gcc dot gnu dot org
2006-03-07 12:28 ` pinskia at gcc dot gnu dot org
2006-03-07 19:52 ` [Bug c/26004] [4.1 " pinskia at gcc dot gnu dot org
2006-03-07 19:55 ` pinskia at gcc dot gnu dot org
2006-03-07 21:02 ` [Bug c/26004] [4.1/4.2 " pinskia at gcc dot gnu dot org
2006-03-07 21:06 ` pinskia at gcc dot gnu dot org
2006-03-08  1:34 ` janis at gcc dot gnu dot org
2006-03-09 17:22 ` jason at gcc dot gnu dot org
2006-03-10 22:47 ` jason at gcc dot gnu dot org
2006-03-10 23:20 ` [Bug middle-end/26004] [4.1 " pinskia at gcc dot gnu dot org
2006-03-10 23:42 ` jason at gcc dot gnu dot org
2006-03-11  0:10 ` pinskia at gcc dot gnu dot org
2006-06-07 15:42 ` pinskia at gcc dot gnu dot 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).