As long as both cranks are 130bcd it should be fine. You mostly run into shifting issues with front chainrings when trying to index on 8 speed or above, but even then most combos work well.
Peter White's article on chainrings covers most compatibility issues below 10 speed.
https://www.peterwhitecycles.com/chainrings.php