public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/23402] New: error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS
@ 2005-08-15 15:28 bunk at stusta dot de
  2005-08-15 15:29 ` [Bug c/23402] " bunk at stusta dot de
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: bunk at stusta dot de @ 2005-08-15 15:28 UTC (permalink / raw)
  To: gcc-bugs

This is a compile error when trying to compile the file kernel/audit.c from the
Linux kernel 2.6.13-rc5-mm1 with a current CVS HEAD gcc.

I've removed many of the compiler flags that were present at the original
compilation. What triggers this problem is switching from -O0 (no problem) to
-O1 (see below).

<--  snip  -->

...
$  /TMP/test/gcc/install/bin/gcc -m32 -Wp,-MD,kernel/.audit.o.d  -nostdinc
-isystem /TMP/test/gcc/install/lib/gcc/i686-pc-linux-gnu/4.1.0/include
-D__KERNEL__ -Iinclude -O1  -save-temps  -Iinclude/asm-i386/mach-default
-Wno-pointer-sign    -DKBUILD_BASENAME=audit -DKBUILD_MODNAME=audit -c -o
kernel/audit.o kernel/audit.c
kernel/audit.c: In function 'audit_init':
kernel/audit.c:518: error: statement makes a memory store, but has no V_MAY_DEFS
nor V_MUST_DEFS
#   VUSE <D.23048_10>;
audit_skb_queue.lock = D.23048;
kernel/audit.c:518: internal compiler error: verify_ssa failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

<--  snip  -->

-- 
           Summary: error: statement makes a memory store, but has no
                    V_MAY_DEFS nor V_MUST_DEFS
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bunk at stusta dot de
                CC: gcc-bugs at gcc dot gnu dot org
 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=23402


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

* [Bug c/23402] error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS
  2005-08-15 15:28 [Bug c/23402] New: error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS bunk at stusta dot de
@ 2005-08-15 15:29 ` bunk at stusta dot de
  2005-08-15 15:30 ` bunk at stusta dot de
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: bunk at stusta dot de @ 2005-08-15 15:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bunk at stusta dot de  2005-08-15 15:28 -------
Created an attachment (id=9498)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9498&action=view)
preprocessed file


-- 


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


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

* [Bug c/23402] error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS
  2005-08-15 15:28 [Bug c/23402] New: error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS bunk at stusta dot de
  2005-08-15 15:29 ` [Bug c/23402] " bunk at stusta dot de
@ 2005-08-15 15:30 ` bunk at stusta dot de
  2005-08-15 15:31 ` [Bug tree-optimization/23402] [4.1 Regression] " pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: bunk at stusta dot de @ 2005-08-15 15:30 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.0.1


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


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

* [Bug tree-optimization/23402] [4.1 Regression] error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS
  2005-08-15 15:28 [Bug c/23402] New: error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS bunk at stusta dot de
  2005-08-15 15:29 ` [Bug c/23402] " bunk at stusta dot de
  2005-08-15 15:30 ` bunk at stusta dot de
@ 2005-08-15 15:31 ` pinskia at gcc dot gnu dot org
  2005-08-15 16:03 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-15 15:31 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |tree-optimization
           Keywords|                            |ice-on-valid-code
            Summary|error: statement makes a    |[4.1 Regression] error:
                   |memory store, but has no    |statement makes a memory
                   |V_MAY_DEFS nor V_MUST_DEFS  |store, but has no V_MAY_DEFS
                   |                            |nor V_MUST_DEFS
            Version|unknown                     |4.1.0


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


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

* [Bug tree-optimization/23402] [4.1 Regression] error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS
  2005-08-15 15:28 [Bug c/23402] New: error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS bunk at stusta dot de
                   ` (2 preceding siblings ...)
  2005-08-15 15:31 ` [Bug tree-optimization/23402] [4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-08-15 16:03 ` pinskia at gcc dot gnu dot org
  2005-08-15 17:24 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-15 16:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-15 15:45 -------
Reducing.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
  GCC build triplet|i686-pc-linux-gnu           |
   GCC host triplet|i686-pc-linux-gnu           |
   Target Milestone|---                         |4.1.0


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


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

* [Bug tree-optimization/23402] [4.1 Regression] error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS
  2005-08-15 15:28 [Bug c/23402] New: error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS bunk at stusta dot de
                   ` (4 preceding siblings ...)
  2005-08-15 17:24 ` pinskia at gcc dot gnu dot org
@ 2005-08-15 17:24 ` pinskia at gcc dot gnu dot org
  2005-08-15 17:29 ` dberlin at dberlin dot org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-15 17:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-15 17:18 -------
Confirmed, reduced testcase:
typedef struct {} raw_spinlock_t;
typedef struct {
  raw_spinlock_t raw_lock;
} spinlock_t;
struct sk_buff_head {
  int i;
  spinlock_t lock;
};
struct sk_buff_head audit_skb_queue;
void audit_init(void)
{
  struct sk_buff_head *list = &audit_skb_queue;
  audit_skb_queue.lock = (spinlock_t) { .raw_lock = { } };
}

Taking the address is required even though it is dead.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-08-15 17:18:44
               date|                            |


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


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

* [Bug tree-optimization/23402] [4.1 Regression] error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS
  2005-08-15 15:28 [Bug c/23402] New: error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS bunk at stusta dot de
                   ` (3 preceding siblings ...)
  2005-08-15 16:03 ` pinskia at gcc dot gnu dot org
@ 2005-08-15 17:24 ` pinskia at gcc dot gnu dot org
  2005-08-15 17:24 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-15 17:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-15 17:24 -------
If I disable structural alias analysis (-fno-tree-salias) the testcase works.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dberlin at gcc dot gnu dot
                   |                            |org, dnovillo at gcc dot gnu
                   |                            |dot org


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


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

* [Bug tree-optimization/23402] [4.1 Regression] error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS
  2005-08-15 15:28 [Bug c/23402] New: error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS bunk at stusta dot de
                   ` (5 preceding siblings ...)
  2005-08-15 17:24 ` pinskia at gcc dot gnu dot org
@ 2005-08-15 17:29 ` dberlin at dberlin dot org
  2005-08-15 17:36 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dberlin at dberlin dot org @ 2005-08-15 17:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dberlin at gcc dot gnu dot org  2005-08-15 17:28 -------
Subject: Re:  [4.1 Regression] error:
	statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS



On Mon, 2005-08-15 at 17:24 +0000, pinskia at gcc dot gnu dot org wrote:
> ------- Additional Comments From pinskia at gcc dot gnu dot org
> 2005-08-15 17:24 -------
> If I disable structural alias analysis (-fno-tree-salias) the testcase
> works.
> 

Ugh.
We dealt with this once.  After discussing with RTH or diego (i forget
who) about what to do here, we decided the best solution is to not
generate these stores into the IL in the first place, rather than hack
up all the code around it to allow zero sized stores.

After all, what is the store of the zero sized field supposed to
represent?






-- 


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


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

* [Bug tree-optimization/23402] [4.1 Regression] error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS
  2005-08-15 15:28 [Bug c/23402] New: error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS bunk at stusta dot de
                   ` (6 preceding siblings ...)
  2005-08-15 17:29 ` dberlin at dberlin dot org
@ 2005-08-15 17:36 ` pinskia at gcc dot gnu dot org
  2005-08-15 17:47 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-15 17:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-15 17:32 -------
This is related to PR 21839 which was fixed by not gimplifying the store but it looks like it did not fix 
fully not gimplifing the store.

-- 


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


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

* [Bug tree-optimization/23402] [4.1 Regression] error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS
  2005-08-15 15:28 [Bug c/23402] New: error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS bunk at stusta dot de
                   ` (7 preceding siblings ...)
  2005-08-15 17:36 ` pinskia at gcc dot gnu dot org
@ 2005-08-15 17:47 ` pinskia at gcc dot gnu dot org
  2005-08-15 22:44 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-15 17:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-15 17:36 -------
Here is another testcase:
typedef struct {} spinlock_t;
struct sk_buff_head {
  int i;
  spinlock_t lock;
};
struct sk_buff_head audit_skb_queue;
void audit_init(void)
{
  struct sk_buff_head *list = &audit_skb_queue;
  spinlock_t a = {};
  audit_skb_queue.lock = a;
}

The gimplifier is emitting the "audit_skb_queue.lock = a;" which is what is causing the issue.

-- 


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


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

* [Bug tree-optimization/23402] [4.1 Regression] error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS
  2005-08-15 15:28 [Bug c/23402] New: error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS bunk at stusta dot de
                   ` (8 preceding siblings ...)
  2005-08-15 17:47 ` pinskia at gcc dot gnu dot org
@ 2005-08-15 22:44 ` pinskia at gcc dot gnu dot org
  2005-08-16 17:43 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-15 22:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-15 22:37 -------
I have a fix which I am testing.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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


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

* [Bug tree-optimization/23402] [4.1 Regression] error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS
  2005-08-15 15:28 [Bug c/23402] New: error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS bunk at stusta dot de
                   ` (9 preceding siblings ...)
  2005-08-15 22:44 ` pinskia at gcc dot gnu dot org
@ 2005-08-16 17:43 ` pinskia at gcc dot gnu dot org
  2005-08-17  1:56 ` cvs-commit at gcc dot gnu dot org
  2005-08-17  2:00 ` pinskia at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-16 17:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-16 17:15 -------
Patch posted here: <http://gcc.gnu.org/ml/gcc-patches/2005-08/msg00985.html>.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2005-
                   |                            |08/msg00985.html
           Keywords|                            |patch


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


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

* [Bug tree-optimization/23402] [4.1 Regression] error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS
  2005-08-15 15:28 [Bug c/23402] New: error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS bunk at stusta dot de
                   ` (10 preceding siblings ...)
  2005-08-16 17:43 ` pinskia at gcc dot gnu dot org
@ 2005-08-17  1:56 ` cvs-commit at gcc dot gnu dot org
  2005-08-17  2:00 ` pinskia at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-08-17  1:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-08-17 01:55 -------
Subject: Bug 23402

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	pinskia@gcc.gnu.org	2005-08-17 01:55:05

Modified files:
	gcc            : ChangeLog gimplify.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/compile: zero-strct-3.c 
	                                     zero-strct-4.c 

Log message:
	2005-08-16  Andrew Pinski  <pinskia@physics.uc.edu>
	
	PR tree-opt/23402
	* gcc.c-torture/compile/zero-strct-3.c: New test.
	* gcc.c-torture/compile/zero-strct-4.c: New test.
	
	2005-08-16  Andrew Pinski  <pinskia@physics.uc.edu>
	
	PR tree-opt/23402
	* gimplify.c (zero_sized_type): New function.
	(gimplify_modify_expr_rhs): If we have a zero sized type,
	replace the statement with an empty statement.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9753&r2=2.9754
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gimplify.c.diff?cvsroot=gcc&r1=2.146&r2=2.147
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5932&r2=1.5933
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/zero-strct-3.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/zero-strct-4.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug tree-optimization/23402] [4.1 Regression] error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS
  2005-08-15 15:28 [Bug c/23402] New: error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS bunk at stusta dot de
                   ` (11 preceding siblings ...)
  2005-08-17  1:56 ` cvs-commit at gcc dot gnu dot org
@ 2005-08-17  2:00 ` pinskia at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-17  2:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-17 01:56 -------
Fixed.

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


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


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

end of thread, other threads:[~2005-08-17  1:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-15 15:28 [Bug c/23402] New: error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS bunk at stusta dot de
2005-08-15 15:29 ` [Bug c/23402] " bunk at stusta dot de
2005-08-15 15:30 ` bunk at stusta dot de
2005-08-15 15:31 ` [Bug tree-optimization/23402] [4.1 Regression] " pinskia at gcc dot gnu dot org
2005-08-15 16:03 ` pinskia at gcc dot gnu dot org
2005-08-15 17:24 ` pinskia at gcc dot gnu dot org
2005-08-15 17:24 ` pinskia at gcc dot gnu dot org
2005-08-15 17:29 ` dberlin at dberlin dot org
2005-08-15 17:36 ` pinskia at gcc dot gnu dot org
2005-08-15 17:47 ` pinskia at gcc dot gnu dot org
2005-08-15 22:44 ` pinskia at gcc dot gnu dot org
2005-08-16 17:43 ` pinskia at gcc dot gnu dot org
2005-08-17  1:56 ` cvs-commit at gcc dot gnu dot org
2005-08-17  2:00 ` 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).