ignore -fPIC, one more missing skip_typeref
authorMatthias Braun <matze@braunis.de>
Tue, 12 Aug 2008 11:38:08 +0000 (11:38 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 12 Aug 2008 11:38:08 +0000 (11:38 +0000)
[r21119]

ast.c
main.c

diff --git a/ast.c b/ast.c
index b3ef16c..7bac0da 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -1468,7 +1468,8 @@ static bool is_object_with_linker_constant_address(const expression_t *expressio
                return is_address_constant(expression->unary.value);
 
        case EXPR_SELECT: {
-               if(is_type_pointer(expression->select.compound->base.type)) {
+               type_t *base_type = skip_typeref(expression->select.compound->base.type);
+               if(is_type_pointer(base_type)) {
                        /* it's a -> */
                        return is_address_constant(expression->select.compound);
                } else {
diff --git a/main.c b/main.c
index 53d85cc..d1ddfc0 100644 (file)
--- a/main.c
+++ b/main.c
@@ -628,6 +628,7 @@ int main(int argc, char **argv)
                                                || strcmp(opt, "unroll-loops") == 0
                                                || strcmp(opt, "expensive-optimizations") == 0
                                                || strcmp(opt, "no-common") == 0
+                                               || strcmp(opt, "PIC") == 0
                                                || strncmp(opt, "align-loops=", sizeof("align-loops=")-1) == 0
                                                || strncmp(opt, "align-jumps=", sizeof("align-jumps=")-1) == 0
                                                || strncmp(opt, "align-functions=", sizeof("align-functions=")-1) == 0) {