| Index: gdb/testsuite/gdb.dwarf2/pieces-optimized-out.c
|
| diff --git a/gdb/testsuite/gdb.threads/corethreads.c b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.c
|
| similarity index 57%
|
| copy from gdb/testsuite/gdb.threads/corethreads.c
|
| copy to gdb/testsuite/gdb.dwarf2/pieces-optimized-out.c
|
| index e3c7c8c3bf70bbea79e099274254a40b542c6976..2bf9cf8e351a92e6b78081a3640927628e10a774 100644
|
| --- a/gdb/testsuite/gdb.threads/corethreads.c
|
| +++ b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.c
|
| @@ -1,4 +1,4 @@
|
| -/* Copyright 2011-2012 Free Software Foundation, Inc.
|
| +/* Copyright (C) 2013 Free Software Foundation, Inc.
|
|
|
| This file is part of GDB.
|
|
|
| @@ -15,33 +15,33 @@
|
| You should have received a copy of the GNU General Public License
|
| along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
| -#include <pthread.h>
|
| -#include <stdlib.h>
|
| -#include <assert.h>
|
| +/* This file is not actually compiled, the .S file is committed alongside
|
| + this file. The reason is that changes to the compiler might result
|
| + in different debug information being created, this could break the
|
| + test. */
|
|
|
| -pthread_t thread0;
|
| -pthread_t thread1;
|
| -
|
| -static void *
|
| -start (void *arg)
|
| +struct str
|
| {
|
| - assert (pthread_self () == thread1);
|
| -
|
| - abort ();
|
| + int a;
|
| + int b;
|
| + int c : 3;
|
| + int d : 3;
|
| +};
|
| +
|
| +int __attribute__ ((noinline))
|
| +foo (int arg)
|
| +{
|
| + return arg;
|
| }
|
|
|
| int
|
| -main (void)
|
| +main ( void )
|
| {
|
| - int i;
|
| -
|
| - thread0 = pthread_self ();
|
| + struct str s = {5, 7, 1, 2};
|
| + int v;
|
|
|
| - i = pthread_create (&thread1, NULL, start, NULL);
|
| - assert (i == 0);
|
| -
|
| - i = pthread_join (thread1, NULL);
|
| - assert (i == 0);
|
| -
|
| - return 0;
|
| + v = (s.a << 1);
|
| + v += foo (v);
|
| + return v + 5 + s.a;
|
| }
|
| +
|
|
|